-
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 seems to be broken on Azure DevOps #4660
Comments
Any chance you have an env var configured with “npm” in the name, case-insensitively? |
@ljharb Not that I can find. This is one of the yaml files used in our pipelines, and it fails on the npm ci step. So all its done so far is set the node version and then immediately call npm ci. `jobs:
|
And which CI command is failing (in which dir)? |
This is the path azure devops is using |
No i mean, your yaml file runs npm ci multiple times, in different dirs. Which one fails? |
the first one in preamble-ui-hcms. Although, it fails on about 6 of our yaml files all in different directories with their own package.json files. |
@terwort My team has been having the same issue. Today I tried
I just did something similar and my pipelines using Try that out! Please let me know if that works for you. |
We are experiencing a similar issue with GitHub Actions that could be related to this one. In our case the error is that Such error is not true because they ARE in sync (nothing changes if I do Let me know if I should open a new issue for that or/and if I can help you to reproduce the issue. |
@Y-LyN-10 are you sure you’re using the same node and npm version locally and in production? |
relates-to npm/cli#4660
this issue you're describing is not the same as the original one, and i think #4664 will help you out |
this is an interesting one. can you reproduce this in a public repository you can share with us? the validation steps that have brought to light issues with |
@Y-LyN-10 If you can share a public repository or reproduction that would be very helpful! Opening a new issue would be best, since it might not be the same issue, and we can look in to it. Thanks! |
@terwort Did the suggestion from #4660 (comment) to use |
Sorry for the late response! Yes, I believe our issue is different - However, if you are still interested in that issue and believe that NPM >=8.5.0 should be compatible with old lockfiles, I can try to create a public repository to reproduce it and I will open another issue for that. Thanks! |
Node 16.14.2 thinks the `package-lock.json` is out of sync when it is not. npm/cli#4660
We ran into this as well in GitHub Actions for Node 16.14.2, but reverting to 16.14.0 fixed it. |
Node 16.14.2 thinks the `package-lock.json` is out of sync when it is not. npm/cli#4660
up the bundled node version to 16, so as to fix node-gyp errors originating from a too-old npm version in 14. Basically, python 3.11 removed a deprecated file open option from python, which consequently blows up `npm ci`, preventing the build. Issue: #12 References: npm/cli#5113 References: npm/cli#4664 References: npm/cli#4660
Yes npm should be fully backwardly compatible with old lockfiles. If you have a way to reproduce an error please open a new issue |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When running npm ci on Azure Devops with the node version set to
16.14.2
, and npm version set to8.5.0
we getThe npm ci command can only install with an existing package-lock.json
. Even though we definitely have a package-lock file.Reverting our node version back to
16.14.0
, and npm to8.3.1
fixes the issue with no other changes required.Expected Behavior
I would expect npm ci to complete successfully.
Steps To Reproduce
I'm not sure exactly the reproduction steps. I just noticed on our Azure Devops pipeline it fails npm ci as mentioned in the
Current Behavior
section.Environment
Environment: ubuntu-20.04
Version: 20220330.0
npm: 8.5.0
node: 16.14.2
The text was updated successfully, but these errors were encountered: