Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 在Windows7上安装弱节点时出错_Node.js - Fatal编程技术网

Node.js 在Windows7上安装弱节点时出错

Node.js 在Windows7上安装弱节点时出错,node.js,Node.js,我似乎无法在Windows7上加载弱节点。我试过Python 2.7、2.5、2.3,但都没有用。看起来(从下面的错误来看),我需要使用Python2的一个版本,但是更改版本似乎没有帮助。感谢您的帮助 C:\project1\node_modules\weak>node "C:\Program Files (x86)\nodejs\node_modules\npm\ bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js"

我似乎无法在Windows7上加载弱节点。我试过Python 2.7、2.5、2.3,但都没有用。看起来(从下面的错误来看),我需要使用Python2的一个版本,但是更改版本似乎没有帮助。感谢您的帮助

C:\project1\node_modules\weak>node "C:\Program Files (x86)\nodejs\node_modules\npm\
bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! rebuild error Error: Python executable "c:\Python25\python.exe" is Pyth
on 3, which is not supported.

gyp ERR! rebuild error     at failPython3 (C:\Program Files (x86)\nodejs\node_mo
dules\npm\node_modules\node-gyp\lib\configure.js:90:14)
gyp ERR! rebuild error     at C:\Program Files (x86)\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:79:9
gyp ERR! rebuild error     at ChildProcess.exithandler (child_process.js:534:7)
gyp ERR! rebuild error     at ChildProcess.EventEmitter.emit (events.js:91:17)
gyp ERR! rebuild error     at maybeClose (child_process.js:634:16)
gyp ERR! rebuild error     at Process._handle.onexit (child_process.js:676:5)
gyp ERR! not ok
npm ERR! weak@0.2.1 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the weak@0.2.1 install script.
npm ERR! This is most likely a problem with the weak package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls weak
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "weak"
npm ERR! cwd C:\project1
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message weak@0.2.1 install: `node-gyp rebuild`
npm ERR! message `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\project1\npm-debug.log
npm ERR! not ok code 0

明显结节-gyp@0.5.2有一个无法正确解析Python版本号的bug,但在036a730f4a3a95e65d8f390f7f5c4f0d3321e422(0.5.3)中已修复。要解决此问题,我必须更新节点gyp:

cd "C:\Program Files (x86)\nodejs"
npm install node-gyp

简单的解决方案,但很难追踪。

我在Windows7主机上的LinuxMint虚拟机上遇到了类似的问题。我通过apt get采购的nodejs(v0.6.19)和npm(v1.1.14)LIB已经过时。我通过源代码安装了npm(v1.3.11)和nodejs(v0.10.20)

在共享文件夹中编译代码时遇到错误,因为在共享文件夹中禁用了符号链接创建。因此,我提取了ZIP,编译并安装了共享文件夹之外的这些文件。这立刻解决了问题