Ubuntu 14.04 新安装的 nodejs
npm
mongodb
, 因为安装一个第三方的程序需要安装 cube
。
使用 npm install cube
安装报错:
npm ERR! Error: No dist in websocket-server package
npm ERR! at next (/usr/share/npm/lib/cache.js:746:26)
npm ERR! at /usr/share/npm/lib/cache.js:739:5
npm ERR! at RegClient.get_ (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:105:14)
npm ERR! at RegClient.<anonymous> (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:41:12)
npm ERR! at fs.js:268:14
npm ERR! at /usr/lib/nodejs/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, 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! System Linux 3.13.0-32-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/me/cube
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/me/cube/npm-debug.log
npm ERR! not ok code 0
尝试了 sudo 权限也没有效果,报相同的错。
看起来:
https://registry.npmjs.org/websocket-server/1.4.4
在下载 websocket-server 1.4.4 dist 的时候返回 404 了,打开看源信息,没有 dist 的信息,看来是源出问题了。。。
伊谢尔伦2017-04-17 13:03:56
Found the reason.
The official source of websocket-server is no longer available. . . I wipe
This is the websocket-server that cube depends on. I am now wondering if I can use other libraries to replace it. .
https://www.npmjs.com/package/websocket-server
I found that the developer website has been shut down, maybe it was attacked. . .
I found the solution, I forgot to check the issue list of the third-party software I want to install :)
The solution is as follows:
cd node_modules/
git clone https://github.com/miksago/node-websocket-server
mv node-websocket-server websocket-server
cd..
npm install cube
In fact, it is replaced by another library.