-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm ci
validates package-lock.json
that is generated with an older version of npm
and fails to resolve
#5125
Comments
ResolvementRunning But if there was a bug in checking the dependency tree, shouldn't the users see a link to #5113 on how to resolve their issue when they encounter it? Opening an issue here so other people that might encounter this exact issue can google it. |
npm i
doesn't solve all peer dependencies npm ci
validates package-lock.json
that is generated with an older version of npm
and fails to resolve
Happening for us too and currently breaking our CI builds on multiple repositories. Edit:
This workaround seems to work. |
Broke our CI builds too. Thanks @irdkwmnsb. Your workaround helped and have worked out for us too. |
Please see pinned issue #5113 |
@wraithgar |
To fix `npm ci` bug npm/cli#5125
package 및 package lock이 동기화가 되지 않아 'npm ci' 수행 시 오류 발생. npm install로 동기화 진행. 커밋 이후에도 다른 환경에서 'npm ci'가 수행되는지 확인 필요. 참고 페이지 :npm/cli#5125 관련: #10
package 및 package lock이 동기화가 되지 않아 'npm ci' 수행 시 오류 발생. npm install로 동기화 진행. 커밋 이후에도 다른 환경에서 'npm ci'가 수행되는지 확인 필요. 참고 페이지 :npm/cli#5125 관련: #10
'npm ci' results an error because package-lock.json and package.json were not synchronized. Therefore, 'npm install' was done. reference: npm/cli#5125 related: #10
'npm ci' results an error because package-lock.json and package.json were not synchronized. Therefore, 'npm install' was done. reference: npm/cli#5125 related: #10
Irdkwmnsb, that was the only workaround for me out of all the options! I ran npm install after removing the package-lock.json file and node modules. Along with checking all dependencies for obsolete ones, several dependencies were also upgraded to the most recent version. It took me five hours to fix as I couldnt update my Firebase Cloud Functions. I was getting the following 6 errors (with command firebase --debug deploy) : {
THE SOLUTION FOR EVERYTHING 🥁(drumroll...)(MAC OS USES SUDO) Npm will always use the version of npm installed with node. If you are running node update node first running: $ sudo npm install -g n(And to install the latest stable node release) $ sudo n latestAnd then check your npm version again - it should be updated. (npm -v) Thank you so much! |
… web-apps" This reverts commit 5012e4e. because error with npm ci (-v 9) on package-lock.json(-v 6) file with local dependencies npm/cli#5125 npm/cli#529
The suggested workaround also worked for me when trying to update firebase cloud function that serves a Nuxt app using Firebase CLI framework functionality. Delete the initial package-lock.json, updated npm (cause why not), and ran npm install. Deploy worked finally. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
package-lock.json generated prior to 8.6.0 is generating package-locks that the new version cannot resolve:
Common libraries like create-react-app use @ pmmmwh/react-refresh-webpack-plugin library which has a dependency of type-fest@0.13.1. Version of npm prior to 8.6.0 would not include type-fest@0.13.1 in the package-lock.json
After the 8.6.0 release, old package-locks would not work for installing dependencies with
npm ci
Expected Behavior
npm ci
should not fail with lockfiles generated by older version npmSteps To Reproduce
See this commit tree for an example of a project with a lockfile that is valid for an old version of npm and not valid for new ones.
Run
npm ci
with npm version 8.6.0 or higher to get the error or see this github actions pipelineEnvironment
The text was updated successfully, but these errors were encountered: