(cli): CDK v1.88 Init
See original GitHub issueThe CDK init command in the latest version is failing to init with the following error. Using: $ npm -v 6.14.10 $ node -v v14.15.4 $ tsc -v Version 4.1.3
Reverting back to 1.87.1 fixes it.
The cdk init command I am trying is: cdk init --language typescript
Error thrown:
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'source-map-support/register'
Require stack:
- /usr/local/lib/node_modules/aws-cdk/bin/cdk.js
- /usr/local/lib/node_modules/aws-cdk/bin/cdk
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/usr/local/lib/node_modules/aws-cdk/bin/cdk.js:4:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/lib/node_modules/aws-cdk/bin/cdk.js',
'/usr/local/lib/node_modules/aws-cdk/bin/cdk'
]
}
Reproduction Steps
- Install the latest aws cdk
npm i -g aws-cdk
- Run the following:
cdk init --language typescript
- Observe the error attached above
What did you expect to happen?
- Expected the typescript cdk project to be inited
What actually happened?
- Error thrown as per above
Environment
- CDK CLI Version : 1.88.0 (causing the error)
- Framework Version: ?
- Node.js Version: v14.15.4
- OS : macOS Catalina 10.15.7
- Language (Version): Typescript
Other
N/A
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:14 (3 by maintainers)
Top Results From Across the Web
AWS CDK Toolkit (cdk command) - AWS Documentation
The AWS CDK Toolkit, the CLI command cdk , is the primary tool for interacting with your AWS CDK app. It executes your...
Read more >AWS CDK Toolkit - npm
The AWS CDK Toolkit provides the cdk command-line interface that can be used to work with AWS CDK applications.
Read more >aws-cdk.core - PyPI
This library includes the basic building blocks of the AWS Cloud Development Kit (AWS CDK). It defines the core classes that are used...
Read more >My Study Notes on AWS Cloud Development Kit (AWS CDK)
0 are not compatible with the AWS CDK. AWS credentials; AWS CLI. Frequently Commands: Install/Update AWS CDK Toolkit.
Read more >aws-cdk | Yarn - Package Manager
They then use the AWS CDK CLI to interact with their CDK app. The CLI allows developers to synthesize artifacts such as AWS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Uninstalling and reinstalling CDK worked for me
Thanks @mickog, that did the trick for me too.