【发布时间】:2012-12-11 18:41:50
【问题描述】:
我正在开发一个实时应用程序,并且我正在使用第三方来完成它。 但是现在我必须使用 node.js 和 socket.io 而不是第三方。
我正确安装了 node.js (v0.4.12) 并使用命令 node -v 检查它。
但是当我使用npm install socket.io 命令安装socket.io 时,我得到了这个错误。
npm ERR! install failed Error: Required package: options(latest) not found. (Found: ["0.0.3"])
npm ERR! install failed (required by: ws@0.4.23)
npm ERR! install failed at /usr/share/npm/lib/build.js:192:19
npm ERR! install failed at cb (/usr/share/npm/lib/utils/graceful-fs.js:32:9)
npm ERR! Error: Required package: options(latest) not found. (Found: ["0.0.3"])
npm ERR! (required by: ws@0.4.23)
npm ERR! at /usr/share/npm/lib/build.js:192:19
npm ERR! at cb (/usr/share/npm/lib/utils/graceful-fs.js:32:9)
npm ERR! Report this *entire* log at <http://github.com/isaacs/npm/issues>
npm ERR! or email it to <npm-@googlegroups.com>
npm ERR! Just tweeting a tiny part of the error will not be helpful.
npm not ok
我该如何解决?
【问题讨论】:
-
节点 0.4 严重过时。先安装当前版本。
-
谢谢。我使用以下命令解决了它: 1- sudo npm install -g n 2-sudo n 0.8.15 3-sudo npm install socket.io
标签: node.js ubuntu socket.io real-time