Solve '' ng 'is not an internal or external command, operable program or batch file. 'This problem

1. Install node.js

2.cmd command :( New npmConfig directory in D drive)

npm config set prefix D:\az\npmConfig\npm

npm config set globalconfig D:\az\npmConfig\npm\etc\npmrc

npm config set globalignorefile D:\az\npmConfig\npm\etc\npmignore

asl install cnpm --registry g = https: //registry.npm.taobao.org


3. Set Environment Variables

D: \ az \ npmConfig \ npm join path environment variable


4. Close the cmd, and then re-open cmd, perform cnpm -v displays the version number, the installation was successful


5. Use cnpm download and install typescript

cnpm install –g typescript

6. Perform tsc -v display typescript version, installed


7.npm install -g angular-cli@latest


8. Test ng version


Guess you like

Origin blog.51cto.com/dd118/2426700