-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nx g lib creates invalid dependencies in package.json #23688
Comments
I am leaning towards to @daiscog idea:
What if we stop adding |
i think after upgrading @swc/packages to latest, the warnings should go away:
|
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> npm warnings: ``` npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: @swc-node/core@1.13.1 npm WARN Found: @swc/core@1.3.107 npm WARN node_modules/@swc/core npm WARN dev @swc/core@"~1.3.85" from the root project npm WARN 3 more (@swc-node/register, nx, ts-node) npm WARN npm WARN Could not resolve dependency: npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1 npm WARN node_modules/@swc-node/register/node_modules/@swc-node/core npm WARN @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0 npm WARN node_modules/@swc-node/register npm WARN npm WARN Conflicting peer dependency: @swc/core@1.5.7 npm WARN node_modules/@swc/core npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1 npm WARN node_modules/@swc-node/register/node_modules/@swc-node/core npm WARN @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0 npm WARN node_modules/@swc-node/register ``` ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #23688
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> npm warnings: ``` npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: @swc-node/core@1.13.1 npm WARN Found: @swc/core@1.3.107 npm WARN node_modules/@swc/core npm WARN dev @swc/core@"~1.3.85" from the root project npm WARN 3 more (@swc-node/register, nx, ts-node) npm WARN npm WARN Could not resolve dependency: npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1 npm WARN node_modules/@swc-node/register/node_modules/@swc-node/core npm WARN @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0 npm WARN node_modules/@swc-node/register npm WARN npm WARN Conflicting peer dependency: @swc/core@1.5.7 npm WARN node_modules/@swc/core npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1 npm WARN node_modules/@swc-node/register/node_modules/@swc-node/core npm WARN @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0 npm WARN node_modules/@swc-node/register ``` ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #23688
<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> npm warnings: ``` npm WARN ERESOLVE overriding peer dependency npm WARN While resolving: @swc-node/core@1.13.1 npm WARN Found: @swc/core@1.3.107 npm WARN node_modules/@swc/core npm WARN dev @swc/core@"~1.3.85" from the root project npm WARN 3 more (@swc-node/register, nx, ts-node) npm WARN npm WARN Could not resolve dependency: npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1 npm WARN node_modules/@swc-node/register/node_modules/@swc-node/core npm WARN @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0 npm WARN node_modules/@swc-node/register npm WARN npm WARN Conflicting peer dependency: @swc/core@1.5.7 npm WARN node_modules/@swc/core npm WARN peer @swc/core@">= 1.4.13" from @swc-node/core@1.13.1 npm WARN node_modules/@swc-node/register/node_modules/@swc-node/core npm WARN @swc-node/core@"^1.12.0" from @swc-node/register@1.8.0 npm WARN node_modules/@swc-node/register ``` ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #23688 (cherry picked from commit a6e23c1)
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
After running
nx g lib foo --unitTestRunner jest --bundler tsc
, a cleannpm install
fails with peer dependency errors.Expected Behavior
nx g lib
doesn't add incompatible deps to package.jsonGitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace@latest nx19
nx g lib foo --unitTestRunner jest --bundler tsc
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
Similar to #19386
The text was updated successfully, but these errors were encountered: