-->

npm install -g generator-X error in windows

2019-03-17 00:11发布

问题:

Both producing same error.

  • npm install -g generator-angular-fullstack.
  • npm install -g generator-meanjs.

I tried everthing (googling and stackoverflow) but this problem is scratching my head from the last 3-4 hours Any support would be helpfull

I tried

npm install -g generator-angular-fullstack 

or

 npm install -g generator-meanjs 

Initially it said python required i installed latest python but again it said not compatible version i searched and found 2.7.3 is supported so I uninstall the latest version and install 2.7.3 and set the enviornment variable of it.

But now it is showing

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

Full Error stack on 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

I am using windows 7 32 bit

npm-debug.log

回答1:

adm-zip v0.4.5 introduced a dependency on fidonet-mailer-binkp-crypt: https://github.com/cthackers/adm-zip/issues/121

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