我正在尝试在我的macbook中安装phonegap,但我一直收到此错误:
sudo npm install -g phonegap
npm ERR! Error: Cannot find module 'readable-stream'
npm ERR! at Function._resolveFilename (module.js:337:11)
npm ERR! at Function._load (module.js:279:25)
npm ERR! at Module.require (module.js:359:17)
npm ERR! at require (module.js:375:17)
npm ERR! at Object.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:3:48)
npm ERR! at Module._compile (module.js:446:26)
npm ERR! at Object..js (module.js:464:10)
npm ERR! at Module.load (module.js:353:31)
npm ERR! at Function._load (module.js:311:12)
npm ERR! at Module.require (module.js:359:17)
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 Darwin 11.4.2
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "phonegap"
npm ERR! cwd /Users/mycomputer/Desktop/test/static/game
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.3.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/mycomputer/Desktop/test/static/game/npm-debug.log
npm ERR! not ok code undefined
npm ERR! not ok code 1
我该怎么做才能安装呢?
非常感谢
PS:
我已经尝试过这个解决方案但根本不起作用:https://github.com/isaacs/npm/issues/3698
答案 0 :(得分:0)
如何从tar.gz文件安装如下: Phonegap installation error(npm)
它说你可以安装如下:
npm install -g path/to/archive/phonegap-cli-master.tar.gz