-
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
generatePackageJson creates incompatible package.json and package-lock.json in certain scenarios. #17653
Comments
I just ran across this issue as well, but with the |
I came across the same issue with the |
Same here 🥲 |
Same issue, my setup:
|
Encountered this issue only after upgrading
|
After a slightly painful
The relevant lines from
It's amazing the amount of harm one individual can do to an ecosystem just because of their ego and idea of "technical correctness" 😢 |
Hello, I have also a problem with the pruned lockfile generated by nx missing some versions of a dependency. Thank you. |
I have been digging into this issue quite a bit and even have a failing test written for it. It appears that when the pruning process sees a aliased package it treats it as a duplicate and removes it? @meeroslav Any thoughts? You can repro this pretty easily from the |
any heads on on this with |
same issue |
May be related to isaacs/jackspeak#5 The workaround i have found was to downgrade @fastify/static package to v6 instead of v7 |
same here |
Hey all! 👋🏻 A few fixes have been released in recent Nx versions (the last one landing on Nx 19.3.0). Could you please update to the latest version and try again? If you still have issues after updating, please provide a reproduction so we can have a look. It's hard to troubleshoot these issues without a proper reproduction. |
Still having this issue> npm ci
npm ERR! code EUSAGE
npm ERR!
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm ERR!
npm ERR! Missing: @grpc/[email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR! Missing: [email protected] from lock file
npm ERR!
npm ERR! Clean install a project
npm ERR!
npm ERR! Usage:
npm ERR! npm ci
npm ERR!
npm ERR! Options:
npm ERR! [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm ERR! [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm ERR! [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm ERR! [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm ERR! [--no-bin-links] [--no-fund] [--dry-run]
npm ERR! [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm ERR! [-ws|--workspaces] [--include-workspace-root] [--install-links]
npm ERR!
npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
npm ERR!
npm ERR! Run "npm help ci" for more info
npm ERR! A complete log of this run can be found in: /Users/aviv.benshahar/.npm/_logs/2024-06-14T11_24_52_514Z-debug-0.log |
|
I see. Unfortunately, we'll need more information to reproduce the issue. These issues are very difficult to reproduce with only the failure logs and the Thanks for the patience! |
Cannot create such a repoI'd be more than happy to help, but seems like we cannot create a public repo that has the issue. I can help you debug that on a Zoom call, if you'd like to 🥷 A quick guess - the |
This issue has been automatically marked as stale because no reproduction was provided within 7 days. |
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
When using
generatePackageJson: true
in the webpack plugin, nested dependencies can be missing from generated package-lock.json, causingnpm ci
to fail.Consider the following package-lock.json
The missing package results in the following error when running
npm ci
(i.e. in a Dockerfile)Expected Behavior
Generated package-lock.json is valid and
npm ci
succeeds.GitHub Repo
No response
Steps to Reproduce
auth0
andopenai
, which both ultimately import[email protected]
but will do so in different folders in node_modules, due to auth0 having a direct dependency on an earlier version of form-data.Nx Report
Failure Logs
Operating System
Additional Information
The root package-lock.json for the project is not missing the dependency.
Also,
Because these have the same version, perhaps one is pruned by this code:
nx/packages/nx/src/plugins/js/lock-file/project-graph-pruning.ts
Lines 52 to 57 in 0848031
The text was updated successfully, but these errors were encountered: