0

我正在尝试按照此处列出的步骤进行操作,但在尝试安装时不断出现错误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

可以在此处找到日志文件。

如果您需要更多信息,请告诉我。

我尝试搜索这些错误或常见问题,但运气为 0,所以我不确定从哪里开始。任何帮助将不胜感激。

谢谢!

更新:阅读下面的答案并要求重新运行后,我收到此错误:

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
4

1 回答 1

0

这似乎与ngrok@2.2.21安装后脚本有关。进行快速调查,似乎有一些与 Ubuntu 相关的问题 -这里。据我所知,这似乎与许可有关。我们将尝试找到一个工作版本并限制我们的 CLI semver,直到解决这个问题,我们已经发布了新版本的 CLI,它限制 ngrok 以2.2.17努力解决这个问题(CLI 版本 0.9.4 - 再次运行npm install -g @shoutem/cli) . 我们ngrok用于简化开发机器上的 React Native 打包器和手机之间的连接。

于 2017-08-24T20:10:29.107 回答