简体   繁体   中英

npm install - g generator-angular error in windows

I'm following a tutorial using yeoman and related tools. trying to run:

npm install - g generator-angular

Seems not to work. I tried one solution from npm install -g generator-X error in windows

The solution was:

npm install --save-dev --save-exact adm-zip@0.4.4

But the same error result is shown.

this is the cmd text:

C:\\Users\\User\\my-server\\my-project λ npm install --save-dev --save-exact adm-zip@0.4.4 adm-zip@0.4.4 node_modules\\adm-zip C:\\Users\\User\\my-server\\my-project

λ npm install - g generator-angular npm ERR! addLocal Could not install C:\\Users\\User\\my-server\\my-project- npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-" "g" "generator-angular"

npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! path C:\\Users\\User\\my-server\\my-project- npm ERR! code ENOENT npm ERR! errno -4058

npm ERR! enoent ENOENT, open 'C:\\Users\\User\\my-server\\my-project-' 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:\\Users\\User\\my-server\\my-project\\npm-debug.log

and this is the npm-debug.log (last few lines):

70 error Windows_NT 6.1.7601

71 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program       Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-" "g" "generator-angular"

72 error node v0.12.0

73 error npm  v2.5.1

74 error path C:\Users\User\my-server\-

75 error code ENOENT

76 error errno -4058

77 error enoent ENOENT, open 'C:\Users\User\my-server\-'

77 error enoent This is most likely not a problem with npm itself

77 error enoent and is related to npm not being able to find a file.

78 verbose exit [ -4058, true ]

Any new workarounds for the issue?

There have been issues with this, or any yeoman generator for that matter, and node v0.12. There has been no permanent solution other than to revert node back to v0.10 or v0.10.36...

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