Mac下安装cordova-hot-code-push-cli失败,执行命令为:sudo npm i -g cordova-hot-code-push-cli
具体错误日志如下:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngrok@2.3.0 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok@2.3.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
错误提示显示permission问题,然后安装ngrok失败,尝试各种方式,其实还是权限不够的问题,显示简介给了权限也没用。
最后翻阅各种帖子,解决方式如下:
npm config set unsafe-perm=true
执行该语句后,再执行上面的安装命令,居然成功了。
网友评论