2

I have installed the AWS CDK as per the instructions here : https://github.com/aws/aws-cdk

npm i -g aws-cdk ran happily, however when I run cdk from the command line the result is

$ cdk
-bash: cdk: command not found

Following the manual install instructions did not fix this.

alessiosavi
  • 2,753
  • 2
  • 19
  • 38
kris
  • 11,868
  • 9
  • 88
  • 110

2 Answers2

4

This turned out to be the node version. I was using node v10, and it needed to be v12.

I used nvm to change versions

nvm use 12.0

and now cdk works.

kris
  • 11,868
  • 9
  • 88
  • 110
0

if you using Windows 10 powershell check policy and Linux systems :

try again using:

sudo npm install -g typescript 

next try :

sudo npm install @aws-cdk/aws-s3 @aws-cdk/aws-lambda
R.S.
  • 2,093
  • 14
  • 29