我正在尝试按照here列出的步骤进行操作,但在尝试安装shoutem-cli - $ npm install -g @shoutem/cli时一直出现错误
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok@2.2.21 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok@2.2.21 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-08-24T13_20_31_973Z-debug.log日志文件可以在here中找到。
如果您需要更多信息,请让我知道。
我尝试搜索这些错误或常见问题,但一无所获,因此我不确定从哪里开始。任何帮助都将不胜感激。
谢谢!
更新:在阅读下面的答案并要求重新运行后,我得到了这个错误:
npm WARN deprecated babel-preset-node7@1.5.0: Use https://github.com/babel/babel-preset-env instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/usr/local/bin/shoutem -> /usr/local/lib/node_modules/@shoutem/cli/src/shoutem.js
> ngrok@2.2.17 postinstall /usr/local/lib/node_modules/@shoutem/cli/node_modules/ngrok
> node ./postinstall.js
ngrok - downloading binary https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
events.js:182
throw er; // Unhandled 'error' event
^
Error: EACCES: permission denied, open '/usr/local/lib/node_modules/@shoutem/cli/node_modules/ngrok/ngrok.zip'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok@2.2.17 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok@2.2.17 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-08-24T21_53_55_950Z-debug.log发布于 2017-08-25 04:10:29
这似乎与ngrok@2.2.21安装后脚本有关。快速调查一下,似乎有一些与Ubuntu相关的问题-- here。据我所知,这似乎与权限有关。我们将尝试找到一个工作版本,并限制我们的命令行界面,直到这个问题得到解决,我们已经发布了新版本的命令行界面,它将ngrok限制到2.2.17,以努力解决这个问题(命令行界面版本0.9.4 -只需再次运行npm install -g @shoutem/cli)。我们正在使用ngrok来简化您的开发机器上的React Native packager和您的手机之间的连接。
https://stackoverflow.com/questions/45868359
复制相似问题