【问题标题】:Permission denied error when I run ionic build ios command?运行 ionic build ios 命令时权限被拒绝错误?
【发布时间】:2017-07-05 06:14:07
【问题描述】:

我跑的时候

离子构建 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

任何帮助将不胜感激.. 提前致谢

【问题讨论】:

    标签: ios cordova ionic2


    【解决方案1】:

    我终于找到了解决办法。

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

    其次,用 sudo 运行这个命令,

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

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

    【讨论】:

      猜你喜欢
      • 2020-02-03
      • 1970-01-01
      • 2019-12-23
      • 2018-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-25
      相关资源
      最近更新 更多