【发布时间】:2014-10-14 13:30:23
【问题描述】:
尝试使用 NPM 安装 bignum Node.js 包,但我运气不佳。我正在使用 Windows 7 并以管理员身份运行命令行。已使用 Python 3.4 将 NPM 更新到最新版本,并且 c:\Python34 在我的 PATH 中(也尝试了 Python 2.6,结果相似)。还尝试了本文中提到的解决方法:npm install returning error。甚至尝试过旧版本的 bignum (0.8.0)。尽管如此,每次我尝试安装时,我都会看到以下内容:
> bignum@0.9.0 install C:\Program Files\nodejs\node_modules\bignum
> node-gyp configure build
C:\Program Files\nodejs\node_modules\bignum>node "C:\Program Files\nodejs\node_m
odules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" config
ure build
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack at errnoException (child_process.js:980:11)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:771:
34)
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:\Program Files\nodejs\node_modules\bignum
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
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" "bignum"
npm ERR! node v0.10.24
npm ERR! npm v2.1.2
npm ERR! code ELIFECYCLE
npm ERR! bignum@0.9.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bignum@0.9.0 install script.
npm ERR! This is most likely a problem with the bignum package,
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 bignum
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Program Files\nodejs\npm-debug.log
有什么我没有做或做错的事情,还是与包裹有关?
亲切的问候,
瑞恩
【问题讨论】:
-
你是本地安装还是全局安装?
-
在我的本地开发机器上安装它。
-
我的意思是,试试 'npm -g install bignum'
-
是的,使用 -g 得到同样的错误 :(
-
尝试将路径更改为直接可执行文件而不是目录 PYTHON=%PYTHONPATH%\python.exe ,这对遇到相同问题的两个人有效。