繁体   English   中英

在Windows上安装Node-inspector

[英]Installing node-inspector on Windows

当我运行npm install node-inspector时,得到以下信息:

....

GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.8
npm http 304 https://registry.npmjs.org/redis/0.7.2
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http 304 https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/hiredis
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/xmlhttprequest/1.2.2
npm http GET https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/hiredis

> hiredis@0.1.14 preinstall C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\redis\node_modules\hiredis
> make || gmake

npm http 304 https://registry.npmjs.org/uglify-js/1.2.5
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http 304 https://registry.npmjs.org/xmlhttprequest/1.2.2
'make' is not recognized as an internal or external command,
operable program or batch file.
'gmake' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! error installing hiredis@0.1.14
npm ERR! error installing redis@0.7.2
npm ERR! error installing socket.io@0.9.8
npm ERR! error rolling back socket.io@0.9.8 Error: UNKNOWN, unknown error 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client'
npm ERR! error installing node-inspector@0.2.0beta3

npm ERR! Error: ENOENT, no such file or directory 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\p
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\nodejs\\\\node.exe" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-inspector"
npm ERR! cwd C:\apache\expTest
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! path C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\package\lib\Validation.fallback.js
npm ERR! fstream_path C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\package\lib\Validation.fallbac
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.io-client\node_modules\___ws.npm\
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:204:26)
npm ERR! error rolling back node-inspector@0.2.0beta3 Error: UNKNOWN, unknown error 'C:\apache\expTest\node_modules\node-inspector\node_modules\socket.io\node_modules\socket.

npm ERR! hiredis@0.1.14 preinstall: `make || gmake`
npm ERR! `cmd "/c" "make || gmake"` failed with 1
npm ERR!
npm ERR! Failed at the hiredis@0.1.14 preinstall script.
npm ERR! This is most likely a problem with the hiredis package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     make || gmake
npm ERR! You can get their info via:
npm ERR!     npm owner ls hiredis
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\nodejs\\\\node.exe" "c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-inspector"
npm ERR! cwd C:\apache\expTest
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! code ELIFECYCLE
npm ERR! message hiredis@0.1.14 preinstall: `make || gmake`
npm ERR! message `cmd "/c" "make || gmake"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\apache\expTest\npm-debug.log
npm not ok

似乎它正在尝试在hiredis上运行nix命令,该命令失败,从而使整个安装崩溃。 有什么办法可以解决这个问题? 我听说有很多Windows用户使用node-inspector,但这也许是来自较新版本的依赖。 有任何想法吗?

正如M. Laing所说,您缺少GNU make,这是hiredis(redis连接器)所必需的。

您不需要node-inspector的redis,但是socket.io需要它,即使它是完全可选的功能。 我已经在github上打开了一个关于这个的问题:

https://github.com/LearnBoost/socket.io/issues/978

解决此问题后,可以解决此问题:

  • github下载socket.io的ZIP存档并解压缩。
  • 编辑package.json文件,并从依赖项中删除redis。
  • 运行一个cmd,进入文件夹并输入npm install
  • 再次键入npm install node-inspector

由于现已安装socket.io,因此现在应该成功。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM