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 [email protected]


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 [email protected]
 
 
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 
        ^
1 error generated.




你可能感兴趣的:(ios,ionic,android)