nx-plugin: The e2e executor ignores dependsOn
See original GitHub issueCurrent Behavior
We have several plugins in our workspace that dependsOn each other. We defined:
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
]
to let them build all needed dependencies. That works finde with nx build
but doesn’t work in the e2e tests.
Expected Behavior
If defined, all needed packages are built.
Steps to Reproduce
Create two plugins where one depend on each other and try to test it.
For reference: https://github.com/nxext/nx-extensions/tree/package-angular/e2e/angular-e2e
Failure Logs
nx run angular-e2e:e2e
Some of the project angular-nx’s dependencies have not been built yet. Please build these libraries before:
- angular-vite
- angular-swc
- vite
Try: nx run angular-nx:build --with-deps Error at /Users/dominikpieper/Projects/angular/nxext/node_modules/@nrwl/node/src/executors/package/package.impl.js:19:19 at Generator.next (<anonymous>) at /Users/dominikpieper/Projects/angular/nxext/node_modules/tslib/tslib.js:117:75 at new Promise (<anonymous>) at __awaiter (/Users/dominikpieper/Projects/angular/nxext/node_modules/tslib/tslib.js:113:16) at packageExecutor (/Users/dominikpieper/Projects/angular/nxext/node_modules/@nrwl/node/src/executors/package/package.impl.js:13:34) at /Users/dominikpieper/Projects/angular/nxext/node_modules/@nrwl/tao/src/commands/run.js:147:23 at Generator.next (<anonymous>) at /Users/dominikpieper/Projects/angular/nxext/node_modules/tslib/tslib.js:117:75 at new Promise (<anonymous>)
Environment
nx report
NX Report complete - copy this into the issue template
Node : 16.13.1 OS : darwin x64 yarn : 1.22.15
nx : 13.8.3 @nrwl/angular : 13.8.3 @nrwl/cli : 13.8.3 @nrwl/cypress : 13.8.3 @nrwl/detox : undefined @nrwl/devkit : 13.8.3 @nrwl/eslint-plugin-nx : 13.8.3 @nrwl/express : undefined @nrwl/jest : 13.8.3 @nrwl/js : 13.8.3 @nrwl/linter : 13.8.3 @nrwl/nest : undefined @nrwl/next : undefined @nrwl/node : 13.8.3 @nrwl/nx-cloud : 13.1.5 @nrwl/react : 13.8.3 @nrwl/react-native : undefined @nrwl/schematics : undefined @nrwl/storybook : 13.8.3 @nrwl/tao : 13.8.3 @nrwl/web : 13.8.3 @nrwl/workspace : 13.8.3 typescript : 4.5.5 rxjs : 6.6.7
Community plugins: @angular-devkit/build-angular: 13.2.4 @angular/compiler-cli: 13.2.1 @angular/core: 13.2.3 @angular/compiler: 13.2.1 @nrwl/nx-plugin: 13.8.3 @nx-plus/docusaurus: 12.2.0 @nx-plus/vue: 12.2.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Hey @chiubaka! Yeah, the nx plugin e2e executor doesn’t provide a ton of extra value, I agree. E2E in general for plugins is something that’s on my list to revisit, its possible that the dependsOn setup should be preferred.
@AgentEnder with just the Jest executor the tests run pretty fine. For e2e I added our own solution right now, which works a little like the e2e tests from the nrwl repo. We spin up a new workspace, deploy to and install from a local verdaccio instance. I created an executor from that, maybe that’s worth as an alternative to the e2e executor