简体   繁体   中英

-bash: cdk: command not found , after installing AWS CDK

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM