Mac 安装Cordova-hot-code-push-cli 失败的解决方法

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! [email protected] postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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!     /Users/macbook/.npm/_logs/2019-12-23T06_25_47_357Z-debug.log

安装 'ngrok' 提示权限不足, 切换到管理员用户也没用.

最后找到一篇帖子

记录一下解决方案:

sudo npm install -g cordova-hot-code-push-cli --unsafe-perm=true --allow-root

你可能感兴趣的:(Mac 安装Cordova-hot-code-push-cli 失败的解决方法)