尝试添加ios平台项目时出现Ionic Framework错误

时间:2015-04-12 21:00:27

标签: ios node.js cordova ionic-framework gulp

我正在尝试创建一个新的Ionic项目,当我运行命令时:

  

离子平台添加ios

最后我收到了以下错误:

  

运行命令:   /Users/nnation/myApp/hooks/after_prepare/010_add_platform_class.js   / Users / nnation / myApp错误:生成EACCES       at exports._errnoException(util.js:746:11)       在ChildProcess.spawn(child_process.js:1162:11)       at Object.exports.spawn(child_process.js:995:9)       at Object.exports.spawn(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:100:31)       at runScriptViaChildProcessSpawn(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:23)       at runScript(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:131:16)       at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:114:20       在_fulfilled(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)       at self.promiseDispatch.done(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)       在Promise.promise.promiseDispatch(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)

我不确定那是什么意思,所以我再次运行它,我得到了以下内容:

  

$ sudo ionic platform add ios运行cordova平台添加ios   平台ios已经添加。

认为一切都很好我然后跑了:

  

$ sudo ionic build ios

然后再次发生这种情况:

  

运行cordova build ios运行命令:   /Users/nnation/myApp/hooks/after_prepare/010_add_platform_class.js   / Users / nnation / myApp错误:生成EACCES       at exports._errnoException(util.js:746:11)       在ChildProcess.spawn(child_process.js:1162:11)       at Object.exports.spawn(child_process.js:995:9)       at Object.exports.spawn(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:100:31)       at runScriptViaChildProcessSpawn(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:188:23)       at runScript(/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:131:16)       at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:114:20       在_fulfilled(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)       at self.promiseDispatch.done(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)       在Promise.promise.promiseDispatch(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)

有人可以协助我找出错误或错过的内容吗?我正在运行MacOS。

1 个答案:

答案 0 :(得分:8)

我使用ionic hooks add解决了这个问题。

找到它here