aws-samples / aws-cross-account-cicd-pipeline

Example of how to use CDK to create a CodePipeline CI/CD pipeline, and how to configure it to deploy resources on different AWS Accounts.
MIT No Attribution
111 stars 37 forks source link

Following the "Building a Cross-account CI/CD Pipeline" workshop. The npm build is failing #32

Open aba0405 opened 1 year ago

aba0405 commented 1 year ago

Hello,

I am following along with the Building a Cross-account CI/CD Pipeline. I am at the Build CDK project stage. Looks like whenever run the npm run build it is showing the following errors.

npm-error

Then when I run cdk ls it also shows an error. I guess that is also expected after the npm build issue

cdk-ls

I have the following versions

versions

joyacv2 commented 1 year ago

Having the same issue

joyacv2 commented 1 year ago

Hi @aba0405

I update the package.json (remove package-lock.json before running npm install again) to the following and works: { "name": "my-pipeline", "version": "0.1.0", "bin": { "cdk": "bin/pipeline.js" }, "scripts": { "build": "tsc", "watch": "tsc -w", "test": "jest", "cdk": "cdk" }, "devDependencies": { "@types/jest": "^29.4.0", "@types/node": "^18.11.18", "@types/prettier": "2.6.0", "aws-cdk": "2.47.0", "jest": "^29.4.1", "ts-jest": "^29.0.5", "ts-node": "^10.9.1", "typescript": "^4.9.4" }, "dependencies": { "aws-cdk-lib": "2.47.0", "constructs": "^10.0.0", "source-map-support": "^0.5.21" } }

aba0405 commented 1 year ago

Thanks a lot. It worked as expected.