nx: @nrwl/nx-plugin:e2e does not support plugins using paths from tsconfig.base.json
Current Behavior
When importing within the same workspace plugins e2e fail.
Expected Behavior
I should be able to run e2e tests in plugins workspace when importing within the same workspace.
Steps to Reproduce
- Create new nrwl workspace:
npx create-nx-plugin my-org --pluginName core - Create second plugin:
nx g @nrwl/nx-plugin:plugin serverless - In
corecreate some utility method - Use it in
serverless - Run
nx e2e serverless-e2e
Failure Logs
Command failed: npm install --legacy-peer-deps
at runPackageManagerInstall (../../packages/nx-plugin/src/utils/testing-utils/nx-project.ts:50:19)
at newNxProject (../../packages/nx-plugin/src/utils/testing-utils/nx-project.ts:70:3)
at Object.ensureNxProject (../../packages/nx-plugin/src/utils/testing-utils/nx-project.ts:82:3)
at tests/serverless.spec.ts:37:7
at ../../node_modules/tslib/tslib.js:117:75
at Object.__awaiter (../../node_modules/tslib/tslib.js:113:16)
Environment
Node : 12.18.3
OS : darwin x64
npm : 6.14.6
nx : Not Found
@nrwl/angular : Not Found
@nrwl/cli : 11.3.0
@nrwl/cypress : Not Found
@nrwl/devkit : 11.3.0
@nrwl/eslint-plugin-nx : 11.3.0
@nrwl/express : Not Found
@nrwl/jest : 11.3.0
@nrwl/linter : 11.3.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 11.3.0
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 11.3.0
@nrwl/web : Not Found
@nrwl/workspace : 11.3.0
typescript : 4.0.7
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 19 (16 by maintainers)
We can reuse the existing
ensureNxProjectfunction, but I’d still want to make use of the...PluginInputsyntax - this is to support running e2e on a workspace that has multiple plugins installed which aren’t necessarily related to each other via the project graph.If we reuse
ensureNxProjectfor this, the syntax shouldn’t change when calling with 1 project so its still not breaking.fighting a stale bot
I’d love a community contribution here - this has continually gotten pushed back on my priority list unfortunately. Looking at the source provided, there is a change that I’d like made:
Rather than listing all of the dependencies in an array, can we have it as only the root nodes listed? Something like: