Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

npm ERR! cdk-sample@0.1.0 build: tsc #23

Open
eddygarcas opened this issue Jun 8, 2022 · 3 comments
Open

npm ERR! cdk-sample@0.1.0 build: tsc #23

eddygarcas opened this issue Jun 8, 2022 · 3 comments

Comments

@eddygarcas
Copy link

I've got this error running aws-rails-provisioner with cicd flag
aws-rails-provisioner build --with-cicd

Any advice?
Thank you!

running npm run build ...
npm info it worked if it ends with ok
npm verb cli [
npm verb cli '/home/duard/.nvm/versions/node/v14.19.1/bin/node',
npm verb cli '/home/duard/.nvm/versions/node/v14.19.1/bin/npm',
npm verb cli 'run',
npm verb cli 'build',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@6.14.16
npm info using node@v14.19.1
npm verb run-script [ 'prebuild', 'build', 'postbuild' ]
npm info lifecycle cdk-sample@0.1.0~prebuild: cdk-sample@0.1.0
npm info lifecycle cdk-sample@0.1.0~build: cdk-sample@0.1.0
npm verb lifecycle cdk-sample@0.1.0~build: unsafe-perm in lifecycle true
npm verb lifecycle cdk-sample@0.1.0~build: PATH: /home/duard/.nvm/versions/node/v14.19.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/duard/RubymineProjects/server-check/cdk-sample/node_modules/.bin:/home/duard/.rbenv/versions/2.7.5/bin:/home/duard/.rbenv/libexec:/home/duard/.rbenv/plugins/ruby-build/bin:/home/duard/.nvm/versions/node/v14.19.1/bin:/home/duard/.rbenv/plugins/ruby-build/bin:/home/duard/.rbenv/shims:/home/duard/.rbenv/bin:/home/duard/bin:/usr/local/bin:/home/duard/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
npm verb lifecycle cdk-sample@0.1.0~build: CWD: /home/duard/RubymineProjects/server-check/cdk-sample
npm info lifecycle cdk-sample@0.1.0~build: Failed to exec build script
npm verb stack Error: cdk-sample@0.1.0 build: tsc `npm verb stack Exit status 2` .... `npm verb node v14.19.1` `npm verb npm v6.14.16` `npm ERR! code ELIFECYCLE` `npm ERR! errno 2` `npm ERR! cdk-sample@0.1.0 build: `tsc
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the cdk-sample@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 2, true ]
npm timing npm Completed in 4418ms

@mullermp
Copy link
Contributor

mullermp commented Jun 8, 2022

Thanks for opening an issue. CDK makes breaking changes often unfortunately. Can you find the generated typescript source and run tsc on it? It would give you better error information.

@eddygarcas
Copy link
Author

Thanks @mullermp
Running the tsc compiler it shows up this error:
❯ npx tsc
my-rails-fargate-stack.ts:42:13 - error TS2345: Argument of type '{ engine: rds.IClusterEngine; masterUser: { username: string; password: cdk.SecretValue; }; instanceProps: { instanceType: ec2.InstanceType; vpc: ec2.IVpc; vpcSubnets: { ...; }; }; defaultDatabaseName: string; removalPolicy: cdk.RemovalPolicy.RETAIN; instances: number; parameterGroup: rds.IParameterGroup; }' is not assignable to parameter of type 'DatabaseClusterProps'.
Object literal may only specify known properties, and 'masterUser' does not exist in type 'DatabaseClusterProps'.
42 masterUser: {
~~~~~~~~~~~~~
43 username: username,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44 password: password

@mullermp
Copy link
Contributor

I think masterUser has been removed in favor of Credentials https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-rds.Credentials.html. You should be able to manually change the generated code with the correct syntax and continue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants