This is my first post so please don’t roast me if I forget to include anything or I’ve put it in the wrong place.
Long story short I’ve ran into a weird error when running
ionic cordova build ios --device --prod
It gets up to
[16:01:31] cleancss finished in 2.26 s
[16:02:08] uglifyjs finished in 41.36 s
[16:02:08] postprocess started ...
Then just stops with no extra information. I’ve tried running it with -verbose too and it doesn’t tell me a single thing.
Here’s my ionic info
cli packages: (Path here, just do not want to show it)
@ionic/cli-utils : 1.10.2
ionic (Ionic CLI) : 3.10.3
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.1
System:
ios-deploy : 1.9.1
Node : v6.11.3
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
Ok, do that please. I am trying to rule out anything to do with Cordova.
You could also try npm run ionic:build --prod for good measure to rule out the CLI itself.
When trying to use npm run ionic: build --prod I got the following error.
Please note in the error below I’ve changed the path to the app to PATH and also changed my app name. This is just to hide it from the public but they’re as they should be
[09:38:40] postprocess started ...
events.js:182
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open 'PATH/www/build/1.js.map'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! APPNAME@0.0.1 ionic:build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the APPNAME@0.0.1 ionic:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /PATH/.npm/_logs/2017-09-15T08_38_40_570Z-debug.log
Only idea I have right now would be a bit drastic, but probably work:
Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.
Yea that file doesn’t exist in my build directory.
Sadly I’ve already tried what you’ve suggested. In actual fact I’ve never had any problems until I recently updated my Ionic CLI and my Node version then this error happened and I down graded back to only have the same issues
Nuking everything and reinstalling is normally a quite sure way to get this fixed.
(Make sure to also delete your node_modules and package-lock.json of your project before then trying to use the project again so it has to npm install again)