试图在Windows 7中安装angular-cli,但出现以下错误; 请帮助您完成相同操作。
C:\Users\admin>npm i -g @angular/cli
C:\Users\admin\AppData\Roaming\npm\ng -> C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
> @angular/cli@6.0.8 postinstall C:\Users\admin\AppData\Roaming\npm\node_modules\@angular\cli
> node ./bin/ng-update-message.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\@angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! file C:\Windows\system32\cmd.exe;C:\Windows\System32\cmd.exe
npm ERR! path C:\Windows\system32\cmd.exe;C:\Windows\System32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\Windows\System32\cmd.exe
npm ERR! @angular/cli@6.0.8 postinstall: `node ./bin/ng-update-message.js`
npm ERR! spawn C:\Windows\system32\cmd.exe;C:\Windows\System32\cmd.exe ENOENT
npm ERR!
npm ERR! Failed at the @angular/cli@6.0.8 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\admin\AppData\Roaming\npm-cache\_logs\2018-07-23T06_21_58_799Z-debug.log
节点版本:
v8.11.3
Npm版本:
6.2.0
答案 0 :(得分:0)
尝试使用此命令
npm install -g @angular/cli --unsafe-perm=true
npm install -g @angular/cli --unsafe-perm=true --allow-root
答案 1 :(得分:0)
您可以按照以下步骤安装cli角
快乐的编码