Skip to content
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

A newer version of the CDK CLI (>= 1.21.0) is necessary to interact with this app #5986

Closed
iliapolo opened this issue Jan 27, 2020 · 3 comments · Fixed by #5989
Closed

A newer version of the CDK CLI (>= 1.21.0) is necessary to interact with this app #5986

iliapolo opened this issue Jan 27, 2020 · 3 comments · Fixed by #5989
Assignees
Labels
bug This issue is a bug. in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI

Comments

@iliapolo
Copy link
Contributor

iliapolo commented Jan 27, 2020

Initializing an app using cdk 1.21.0 and trying to synth it results in an error.

A newer version of the CDK CLI (>= 1.21.0) is necessary to interact with this app

Workaround

A workaround is to install 1.22.0 (or latest) version of the CLI.

npm install -g [email protected]

see #5986 (comment)

Reproduction Steps

npm install -g [email protected]
cdk init --language typescript
cdk synth

Error Log

A newer version of the CDK CLI (>= 1.21.0) is necessary to interact with this app

Environment

  • CLI Version : 1.21.0
  • Framework Version: NA
  • OS : MacOS
  • Language : Typescript

Other

cdk --version                                                                                                                                                       [23:07:16]
1.21.0 (build bf6ab14)

This is 🐛 Bug Report

@iliapolo iliapolo added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jan 27, 2020
@SomayaB SomayaB added the package/tools Related to AWS CDK Tools or CLI label Jan 27, 2020
@iliapolo
Copy link
Contributor Author

Actually, this will happen in all versions except for the latest (1.22.0 at the time of writing). This is because we still use a caret dependency for @aws-cdk/core in our templates. Combine this with a protocol change that version 1.22.0 introduced, and we get this error.

@SomayaB SomayaB added p0 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 27, 2020
@iliapolo
Copy link
Contributor Author

iliapolo commented Jan 27, 2020

The error message itself is misleading, and is actually a bug in and of itself. It instructs the user to install >= 1.21.0, which is what is installed (1.21.0)

Installing version 1.22.0 (or simply latest) of aws-cdk will resolve this problem.

@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Jan 27, 2020
@iliapolo iliapolo changed the title cdk templates are broken for v1.21.0 A newer version of the CDK CLI (>= 1.21.0) is necessary to interact with this app Jan 28, 2020
@iliapolo iliapolo pinned this issue Jan 28, 2020
@iliapolo iliapolo added p1 and removed p0 labels Jan 28, 2020
shivlaks added a commit that referenced this issue Feb 5, 2020
…s are broken in 1.21.0 (#5989)

Addressed by using fixed dependencies in init templates

Fixes #5986
@NetaNir NetaNir unpinned this issue Feb 11, 2020
@w601sxs
Copy link

w601sxs commented Feb 18, 2020

Doing npm install -g [email protected] as suggested

gives ..

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code EEXIST
npm ERR! syscall symlink
npm ERR! path ../lib/node_modules/aws-cdk/bin/cdk
npm ERR! dest /home/ubuntu/.nvm/versions/node/v10.18.0/bin/cdk
npm ERR! errno -17
npm ERR! EEXIST: file already exists, symlink '../lib/node_modules/aws-cdk/bin/cdk' -> '/home/ubuntu/.nvm/versions/node/v10.18.0/bin/cdk'
npm ERR! File exists: /home/ubuntu/.nvm/versions/node/v10.18.0/bin/cdk
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2020-02-18T14_34_29_253Z-debug.log

Doing npm install -g --force [email protected] as suggested in the error message, and then doing cdk --version gives 1.22 [succeeds]

npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
/home/ubuntu/.nvm/versions/node/v10.18.0/bin/cdk -> /home/ubuntu/.nvm/versions/node/v10.18.0/lib/node_modules/aws-cdk/bin/cdk

[email protected] postinstall /home/ubuntu/.nvm/versions/node/v10.18.0/lib/node_modules/aws-cdk/node_modules/core-js-pure

node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
https://opencollective.com/core-js 
https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
4 participants