无法在Windows 7上通过npm安装mean-cli

Mean-cli是一个用来初始化平均完整的javascript框架的包。 但是我不能通过npm全局安装。 这是我可以提供给你明白我的意思。

C:\Windows\System32>npm install -g mean-cli npm WARN engine mean-cli@0.9.14: wanted: {"node":"0.10.x","npm":"2.1.x"} (current:{"node":"0.10.34","npm":"1.4.28"}) > mean-cli@0.9.14 preinstall C:\Users\Rahul's\AppData\Roaming\npm\node_modules\mean-cli > node ./scripts/preinstall npm ERR! mean-cli@0.9.14 preinstall: `node ./scripts/preinstall` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the mean-cli@0.9.14 preinstall script. npm ERR! This is most likely a problem with the mean-cli package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./scripts/preinstall npm ERR! You can get their info via: npm ERR! npm owner ls mean-cli npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "mean-cli" npm ERR! cwd C:\Windows\System32 npm ERR! node -v v0.10.34 npm ERR! npm -v 1.4.28 npm ERR! syscall spawn npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! not ok code 0 C:\Windows\System32>npm install -g npm C:\Users\Rahul's\AppData\Roaming\npm\npm -> C:\Users\Rahul's\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js npm@2.1.14 C:\Users\Rahul's\AppData\Roaming\npm\node_modules\npm C:\Windows\System32>npm -v 2.1.14 C:\Windows\System32>npm install -g mean-cli > mean-cli@0.9.14 preinstall C:\Program Files\nodejs\node_modules\mean-cli > node ./scripts/preinstall npm ERR! Windows_NT 6.1.7601 npm ERR! argv "node" "C:\\Users\\Rahul's\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "mean-cli" npm ERR! node v0.10.34 npm ERR! npm v2.1.14 npm ERR! file cmd npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! mean-cli@0.9.14 preinstall: `node ./scripts/preinstall` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the mean-cli@0.9.14 preinstall script 'node ./scripts/preinstall'. npm ERR! This is most likely a problem with the mean-cli package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node ./scripts/preinstall npm ERR! You can get their info via: npm ERR! npm owner ls mean-cli npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! C:\Windows\System32\npm-debug.log C:\Windows\System32>node -v v0.10.34 C:\Windows\System32>npm -v 2.1.14 

我已经提到了一个堆栈溢出问题,在那里讨论了应该更新节点。 我的nodejs更新,我已经更新npm,你们可以看到。 但后来我得到.scripts / preinstall.js错误。 看到他们的github票,他们说这个问题已经解决,但我仍然面临着这个问题。 任何帮助,将不胜感激。

我刚刚遇到了同样的问题。

以pipe理员身份运行控制台为我解决了这个问题。