2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

「ionic platform add ios」で「spawn EACCES」エラーが発生した

Posted at

ionicプロジェクトを作ってios platformを追加した時「spawn EACCES」エラーが発生した。

$ ionic start TestApp sidemenu
$ cd TestApp
$ ionic platform add ios
Downloading Default Ionic Resources

Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================]  100%  0.0s
Done adding default Ionic resources
Adding icons for platform: ios
running cordova platform add ios
npm http GET https://registry.npmjs.org/cordova-ios/3.8.0
npm http 200 https://registry.npmjs.org/cordova-ios/3.8.0
npm http GET https://registry.npmjs.org/cordova-ios/-/cordova-ios-3.8.0.tgz
npm http 200 https://registry.npmjs.org/cordova-ios/-/cordova-ios-3.8.0.tgz
Adding ios project...
iOS project created with cordova-ios@3.8.0
Running command: /Users/babukuma/Documents/Workspace/TestApp/hooks/after_prepare/010_add_platform_class.js /Users/babukuma/Documents/Workspace/CompassJapan
Error: spawn EACCES
    at exports._errnoException (util.js:746:11)
    at 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:189:23)
    at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:132:16)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:115: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)

調べて見つかった解決策はのは「ionic hooks add」をする事。情報元はhttp://forum.ionicframework.com/t/add-ios-error/20262/7

$ionic platform remove ios
$ionic hooks add 
$ionic platform ios

これでエラーなしでios platformが追加された。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?