Ionic添加平台EACCES错误 [英] Ionic Add Platform EACCES Error
问题描述
每当我使用离子平台添加[platformname]
它给我这个错误
Whenever I use ionic platform add [platformname]
It gives me this error
错误:在exports._errnoException(util.js:746:11)中生成EACCES
$ Child $ process $ s
(child_process.js:1155:11)
at Object.exports.spawn(child_process.js:988:9)
at Object.exports.spawn(/ usr / local / lib / node_modules / cordova / node_modules / cordova-
lib / src / cordova / superspawn.js:100:31)
在runScriptViaChildProcessSpawn(/ usr / local / lib / node_modules / cordova / node_modules / cordova-
lib / src /hooks/HooksRunner.js:188:23)
在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
at _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)
at Promise.promise.promiseDispatch(/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13 )
Error: spawn EACCES
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1155:11)
at Object.exports.spawn (child_process.js:988: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
at _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)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)
推荐答案
似乎解压缩的项目具有不正确的权限。 此回答建议更改 hooks / after_prepare / 010_add_platform_class.js
到755的权限。但是解决方案从 Ioinc论坛中显示出另一种简单方法解决此问题 - 只需运行
It seems that the unpacked project has incorrect permissions. This answer suggested to change the permissions of hooks/after_prepare/010_add_platform_class.js
to 755. But the solution from the Ioinc forum showed another easy way to solve this -- just run
ionic hooks add
创建项目并更改为项目目录。然后执行:
after you create the project and change to your project directory. Then run:
ionic platform add ios
将成功无错。
这篇关于Ionic添加平台EACCES错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!