3
votes

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 [email protected]

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 [email protected] [email protected] 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?

1
Try npm install -g generator-angular, without a space before the g, like -g, not like - g.Jackson
That was it, although now there seems to be other subsequent issues, with the dependencies: bower angular-animate#^1.3.0 ENOGIT git is not installed or not in the PATH npm WARN engine [email protected]: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.0","npm":"2.5.1"}) Loading "Gruntfile.js" tasks...ERROR Error: Cannot find module 'glob' Warning: Task "wiredep" not found. Use --force to continue. | Aborted due to warnings. npm WARN optional dep failed, continuing [email protected]yaron hochman
The error says "git is not installed or not in the PATH", that means you need to install git. git-scm.com/download/winJackson

1 Answers

1
votes

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...