self mutating cdk pipeline fails after updating cdk version from 1.85.0 to 1.92.0
See original GitHub issue❓ General Issue
[Container] 2021/03/11 11:26:36 Phase context status code: Message: [Container] 2021/03/11 11:26:36 Entering phase INSTALL [Container] 2021/03/11 11:26:36 Phase complete: INSTALL State: SUCCEEDED [Container] 2021/03/11 11:26:36 Phase context status code: Message: [Container] 2021/03/11 11:26:36 Entering phase PRE_BUILD [Container] 2021/03/11 11:26:36 Running command npm ci npm ERR! @aws-cdk/yaml-cfn not accessible from aws-cdk
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-03-11T11_26_41_322Z-debug.log
[Container] 2021/03/11 11:26:41 Command did not exit successfully npm ci exit status 1 [Container] 2021/03/11 11:26:41 Phase complete: PRE_BUILD State: FAILED [Container] 2021/03/11 11:26:41 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npm ci. Reason: exit status 1
self-mutating cdk pipeline which was working before is failing with above error in build stage synth action after upgrading cdk version to v1.92.0
The Question
Environment
- CDK CLI Version: 1.92
- Module Version:
- Node.js Version: 12.16.1
- OS: Windows 10
- Language (Version): Typescript
Other information
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top GitHub Comments
@dhirajkhodade My issue was due to the default codebuild image using npm v6.x instead of npm v7.x, which i’m using locally and which produces a
lockfileVersion:2
instead oflockfileVersion:1
package-lock.json file. So when codebuild pulls the code from my repo, it’s getting a package-lock.json that isn’t compatible with npm v6.x but it tries to use it anyway without throwing a mismatch error.Potential solutions:
rm -rf package-lock.json && npm i
to generate and commit a lockfileVersion:1 lock file⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.