简体   繁体   中英

NPM Error When Trying To Install Angular CLI

I can't install Angular CLI in my local desktop, as it is giving some JAVA path error.

I have tried to install Angular CLI with and without java. However, I still can't install Angular CLI.

Error Message:

C:\\Users\\Anindya>npm install -g @angular/cli@latest

npm ERR! file C:\\Windows\\system32\\cmd.exe;C:\\Program Files\\Java\\jdk1.8.0_211\\bin

npm ERR! path C:\\Windows\\system32\\cmd.exe;C:\\Program Files\\Java\\jdk1.8.0_211\\bin

npm ERR! code ELIFECYCLE

npm ERR! errno ENOENT

npm ERR! syscall spawn C:\\Windows\\system32\\cmd.exe;C:\\Program Files\\Java\\jdk1.8.0_211\\bin

npm ERR! @angular/cli@8.0.1 postinstall: node ./bin/postinstall/script.js

npm ERR! spawn C:\\Windows\\system32\\cmd.exe;C:\\Program Files\\Java\\jdk1.8.0_211\\bin

npm ERR! Failed at the @angular/cli@8.0.1 postinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! C:\\Users\\Anindya\\AppData\\Roaming\\npm-cache_logs\\2019-06-04T06_19_01_033Z-debug.log

在此输入图像描述

Please verify your PATH variable: JAVA & Node.

Try to run npm cache clean --force before install @angular/cli

enter image description here Hi All,

Thanks for all your support. The issue was with my Windows 7 OS. I updated my OS to Windows 8 and successfully installed angular js

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