Unable to run CDK local Error: Cannot find module 'aws-cdk/lib/api/aws-auth/sdk-provider'
See original GitHub issueTrying to run cdklocal (having used npm to install it) and get the following error:
node:internal/modules/cjs/loader:927
throw err;
^
Error: Cannot find module 'aws-cdk/lib/api/aws-auth/sdk-provider'
Require stack:
- /usr/local/lib/node_modules/aws-cdk-local/bin/cdklocal
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Module.require (node:internal/modules/cjs/loader:996:19)
at require (node:internal/modules/cjs/helpers:92:18)
at Object.<anonymous> (/usr/local/lib/node_modules/aws-cdk-local/bin/cdklocal:3:18)
at Module._compile (node:internal/modules/cjs/loader:1092:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
at Module.load (node:internal/modules/cjs/loader:972:32)
at Function.Module._load (node:internal/modules/cjs/loader:813:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/lib/node_modules/aws-cdk-local/bin/cdklocal' ]
}
Note: I’m using cdk with python code (but tried running cdklocal
in an empty directory as well).
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Solving Cannot find Module Error in AWS CDK | bobbyhadz
In order to solve the Cannot find Module Error we have to npm install all CDK packages we are importing. If it doesn't...
Read more >AWS CDK: Cannot find module 'typescript' - Stack Overflow
I have faced similar issue and my build was not working. However, my installing ts-node as global seems to solve the problem
Read more >Troubleshooting common AWS CDK issues
When deploying my AWS CDK stack, I receive a NoSuchBucket error ... npx aws-cdk runs the local version of the AWS CDK Toolkit...
Read more >@aws-cdk/core - npm
AWS Cloud Development Kit Core Library. Latest version: 1.186.1, last published: 15 hours ago. Start using @aws-cdk/core in your project by running `npm...
Read more >awslabs/aws-cdk - Gitter
CDK deploy runs smoothly, but at runtime I get a cannot find module nconf/store/argv error. My code is working well, 'cause no test...
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
got similar issue:
with
"aws-cdk": "1.111.0"
&"aws-cdk-local": "1.65.5"
but with"aws-cdk-local": "1.65.4"
all looks goodPlease note I had a similar issue with aws-cdk-local version 1.65.5 My error was
cdklocal --version
Error Cannot find module diff
Taking @SimonLdj advice solved the issue.