windows 中的 npm install -g generator-X 错误

npm install -g generator-X error in windows

两者都产生相同的错误。

我尝试了一切(谷歌搜索和 Whosebug),但在过去的 3-4 小时里这个问题一直困扰着我 任何支持都会有所帮助

我试过了

npm install -g generator-angular-fullstack 

 npm install -g generator-meanjs 

最初它说 python 要求我安装最新的 python 但它再次说不兼容版本我搜索并发现支持 2.7.3 所以我卸载最新版本并安装 2.7.3 和设置它的环境变量。

但是现在显示

gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1

cmd 上的完整错误堆栈:-

gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_module
s\npm\node_modules\node-gyp\lib\configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:
12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Users\Rachit\AppData\Roaming\npm\node_modules\generator-angular-
fullstack\node_modules\yeoman-generator\node_modules\download\node_modules\decom
press\node_modules\decompress-unzip\node_modules\adm-zip\node_modules\fidonet-ma
iler-binkp-crypt
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
|
> yo@1.3.3 postinstall C:\Users\Rachit\AppData\Roaming\npm\node_modules\generato
r-angular-fullstack\node_modules\yo
> yodoctor


Yeoman Doctor
Running sanity checks on your system

√ Global configuration file is valid
√ NODE_PATH matches the npm root
√ No .bowerrc file in home directory
√ No .yo-rc.json file in home directory

Everything looks all right!
npm ERR! fidonet-mailer-binkp-crypt@0.0.21 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fidonet-mailer-binkp-crypt@0.0.21 install script.
npm ERR! This is most likely a problem with the fidonet-mailer-binkp-crypt packa
ge,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls fidonet-mailer-binkp-crypt
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\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "generator-angular-fulls
tack"
npm ERR! cwd C:\Users\Rachit\Desktop\node_example
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Rachit\Desktop\node_example\npm-debug.log
npm ERR! not ok code 0

我用的是windows7 32位

npm-debug.log

adm-zip v0.4.5 引入了对 fidonet-mailer-binkp-crypt 的依赖: https://github.com/cthackers/adm-zip/issues/121

解决方法: npm install --save-dev --save-exact adm-zip@0.4.4