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
pipelines: Calling npm ci
only works after updating npm
#23343
Comments
Hi @estrehle , I tried to repro the issue and got an error at build stage(not at the "npm ci"). Could you please share some more information to help me in repro of the issue? |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
I can confirm the bug and the suggested fix. |
From what I can tell, this is due to the package-lock.json being lock version 3, while the |
OK so this was due to me most recently changing my default node via |
I think this is fixed by #24544 |
We don't have a good mechanism for monitoring comments on closed isseus/prs. If this is still an issue, please create a new issue for us to track. |
@a-shatou Works for me using "aws-cdk-lib": "2.81.0" |
The CDK pipelines example contains the following synth step:
When I tried this, however, my pipelines failed at the
npm ci
command with a strange error message:The package
aws-cdk-lib
was the first entry in mypackage.json
dependencies. So it seems like CodeBuild was not able to parse my dependencies when installing vianpm ci
.The reason that
npm ci
does not work is that CodeBuild uses an old version of npm. When I checked, the newest release was 9.2.0 and CodeBuild was using 6.14.17.Updating npm before running
npm ci
fixes the issue:I would suggest adding the
installCommands
line in the documentation so other users can avoid this issue.Stackoverflow issue: Link
Minimum working example with issue and fix: Link
Links
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines-readme.html
The text was updated successfully, but these errors were encountered: