Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(cli): CDK v1.88 Init

See original GitHub issue

The 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:

  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) {
  requireStack: [

Reproduction Steps

  1. Install the latest aws cdk npm i -g aws-cdk
  2. Run the following: cdk init --language typescript
  3. 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


  • 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



This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

mickogcommented, Apr 6, 2021

Uninstalling and reinstalling CDK worked for me

Baza-86commented, Jun 28, 2021

Thanks @mickog, that did the trick for me too.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found