2017-06-04 88 views
0

我试图用连帽衫试穿,但npm安装不适合我。连帽衫后安装失败:process.env.PWD未定义

的Windows 10 节点7.0.0 NPM 3.10.8

npm ERR! [email protected] postinstall: `node ./bin/setup.js` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script 'node ./bin/setup.js'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the hoodie package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node ./bin/setup.js 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs hoodie 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls hoodie 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  F:\dev\mrkennedy-ca\countby\npm-debug.log 
F:\dev\mrkennedy-ca\countby [gh-pages +0 ~3 -0]> node -v 
v7.0.0 
F:\dev\mrkennedy-ca\countby [gh-pages +0 ~3 -0]> npm -v 
3.10.8 

问题与安装后脚本,具体而言,process.env.PWD是不确定的,但脚本试图访问它:

> [email protected] postinstall F:\dev\mrkennedy-ca\countby\node_modules\hoodie 
> node ./bin/setup.js 

F:\dev\mrkennedy-ca\countby\node_modules\hoodie\bin\setup.js:7 
var installIntoApp = process.env.PWD.indexOf('node_modules') !== -1 
           ^

TypeError: Cannot read property 'indexOf' of undefined 
at Object.<anonymous> (F:\dev\mrkennedy-ca\countby\node_modules\hoodie\bin\setup.js:7:37) 
at Module._compile (module.js:573:32) 
at Object.Module._extensions..js (module.js:582:10) 
at Module.load (module.js:490:32) 
at tryModuleLoad (module.js:449:12) 
at Function.Module._load (module.js:441:3) 
at Module.runMain (module.js:607:10) 
at run (bootstrap_node.js:382:7) 
at startup (bootstrap_node.js:137:9) 
at bootstrap_node.js:497:3 

建议?此安装位于现有软件包的内部,但在尝试安装新软件包时会得到相同的结果,如quickstart directions

回答