gpt4 book ai didi

node.js - 无法使用 npm 安装 phonegap

转载 作者:搜寻专家 更新时间:2023-11-01 00:08:43 24 4
gpt4 key购买 nike

我正在尝试在我的 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

我必须做什么才能安装它?

非常感谢

注意:

我已经尝试过这个解决方案,但它根本不起作用:https://github.com/isaacs/npm/issues/3698

最佳答案

如何从这样的 tar.gz 文件安装: Phonegap installation error(npm)

它说你可以像下面这样安装:

npm install -g path/to/archive/phonegap-cli-master.tar.gz

关于node.js - 无法使用 npm 安装 phonegap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17899696/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com