Ionic ios build failure Exit status 126

I have an ionic 2 project I created on a windows machine and have built and released successfully for android. I’ve copied the entire folder/files over to a Mac and am attempting to build now for ios. But when I enter “ionic build ios” into the CLI it is throwing this error:

sh: /Users/blt/MyApp/node_modules/.bin/ionic-app-scripts: Permission denied

Darwin 15.6.0
argv “usr/local/bin/node” “/usr/local/bin/npm” “run” “ionic:build” "–"
node v6.9.1
npm v3.10.8
ionic-hello-world@ ionic:build: 'ionic-app-scripts build’
Exit status 126

Failed at the ionic-hello-world@ ionic:build script 'ionic-app-scripts build’
Make sure you have the latest version of node.js and npm installed.
If you do, this is most likely a problem with the ionic-hello-world package,
not with npm itself.
Tell the author that this fails on your system:
ionic-app-scripts build
You can get information on how to open an issue for this project with:
npm bugs ionic-hello-world
Or if that isn’t available, you can get their info via:
npm owner ls ionic-hello-world
There is likely additional logging output above.

I am getting the same error, did the exact thing. Did you manage to get a solution?

No… I ended up having to just recreate the app on the Mac with a fresh $ ionic start, and then just copied over the various pages and services. My hunch is that there was some difference in software versions (although I had checked carefully to use the same node, npm, ionic, etc.

I would recommend vaping node_modules and running npm install. In general, you probably don’t want to be copying projects from machine to machine; rather check out from a shared git repository (in which you deliberately don’t include node_modules), and problems like this become much rarer.