[Help] (Error: spawn EACCES)

Problem happened when I used sudo ionic build ios

macbook:myapp Steven$ sudo ionic build ios
Running command: /Users/StevenLee/myApp/hooks/after_prepare/010_add_platform_class.js /Users/StevenLee/myApp
Error: spawn EACCES

and I did :sudo chmod a+x myApp
but nothing happened…

sudo is a bad idea for the build. It will do things to your node .config folder that you absolutely don’t want. May I ask why you are using sudo in the first place?

Make sure that the hook exists by navigating to that folder.