繁体   English   中英

npm install angular-cli引发错误(Windows)

[英]npm install angular-cli throws error (Windows)

我在Windows机器上安装angular-cli时遇到问题。这是安装日志。 我正在使用节点v4.4.3,我刚刚通过npm对其进行了升级。 我还检查了文件夹C:\\Users\\Valor_\\AppData\\Roaming\\npm ,它不为空。 节点也被添加到系统环境变量中。 我还尝试过以管理员身份运行CMD。 出现相同的问题。

C:\WINDOWS\system32>npm install -g angular-cli
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated lodash-node@2.4.1: This package is discontinued. Use lodash@^4.0.0.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
C:\Users\Valor_\AppData\Roaming\npm
`-- (empty)

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\angular-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.14: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "angular-cli"
npm ERR! node v4.4.3
npm ERR! npm  v4.0.0
npm ERR! path C:\Users\Valor_\AppData\Roaming\npm\node_modules\.staging\abbrev-63bb1bbf
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Valor_\AppData\Roaming\npm\node_modules\.staging\abbrev-63bb1bbf' -> 'C:\Users\Valor_\AppData\Roaming\npm\node_modules\angular-cli\node_modules\npm\node_modules\abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\Valor_\AppData\Roaming\npm\node_modules\.staging\abbrev-63bb1bbf' -> 'C:\Users\Valor_\AppData\Roaming\npm\node_modules\angular-cli\node_modules\npm\node_modules\abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR!     C:\WINDOWS\system32\npm-debug.log

C:\WINDOWS\system32>node -v
v4.4.3

那怎么了? 我可以解决我的问题吗? 如果您需要任何其他信息,请告诉我,我会提供。 先感谢您!

也许您可以尝试其他问题中提供的其他解决方案: Angular2 QuickStart npm start无法正常工作

当我在Windows 7上关注本教程时,它帮助我解决了此问题。

这帮助了我。 现在可以了

npm remove -g angular-cli
npm cache clean
npm install -g angular-cli

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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