繁体   English   中英

运行ionic build ios命令时权限被拒绝错误?

[英]Permission denied error when I run ionic build ios command?

我跑的时候

离子构建ios

我收到以下错误。

sh:/Users/imac/Documents/TGF_IOS/node_modules/.bin/ionic-app-scripts:权限被拒绝

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "ionic:build" "--"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@0.0.0 ionic:build: `ionic-app-scripts build`
npm ERR! Exit status 126
npm ERR! 
npm ERR! Failed at the ionic-hello-world@0.0.0 ionic:build script 'ionic-app-scripts build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/imac/Documents/TGF_IOS/npm-debug.log

任何帮助将不胜感激..预先感谢

终于我有了解决方案。

第一步,检查您是否具有对项目文件夹的权限(读/写)。

其次,使用sudo运行此命令,

sudo npm install @ionic/app-scripts@latest --save-dev

这将安装最新的应用脚本,并将解决该问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM