`

Ionic Build 时候出现了 Error: spawn EACCES

阅读更多



$ ionic platform add ios
Adding ios project...


Creating Cordova project for the iOS platform:


	Path: platforms/ios

	Package: io.ionic.starter
	Name: V2 Test

iOS project created with cordova-ios@4.2.0


Running command: /Users/nishurong/PhpstormProjects/ionic-workspace/H5APP/hooks/after_prepare/010_add_platform_class.js /Users/nishurong/PhpstormProjects/ionic-workspace/H5APP


Error: spawn EACCES


$ ionic platform add ios
Adding ios project...
 
 
Creating Cordova project for the iOS platform:
 
 
	Path: platforms/ios
 
	Package: io.ionic.starter
	Name: V2 Test
 
iOS project created with cordova-ios@4.2.0
 
 
Running command: /Users/nishurong/PhpstormProjects/ionic-workspace/H5APP/hooks/after_prepare/010_add_platform_class.js /Users/nishurong/PhpstormProjects/ionic-workspace/H5APP
 
 
Error: spawn EACCES



解决方案是:

$ ionic hooks add
Adding in default Ionic Cordova hooks
Added default Ionic Cordova hooks


然后继续执行add ios,即可。

注意,先进入platforms目录,如果存在ios目录,先删除掉,否则,执行run ios命令的时候,会出现下面的错误:

/Users/xueron/PhpstormProjects/ionic-workspace/H5APP/platforms/ios/V2 Test/Classes/MainViewController.h:28:9: fatal error: 'Cordova/CDVViewController.h' file not found
#import <Cordova/CDVViewController.h>
        ^
1 error generated.




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics