iOS Production build silently erroring


#1

Hi,

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

Any help? :slight_smile:


#2

Packages look recent, nothing obviously wrong.

Does it work without --prod?


#3

Yes, when not using the --prod tag it builds successfully.


#4

What happens on ionic build --prod?


#5

I’ll have to get back to you on that tomorrow. However, I think I tried doing it and it just did the same thing as I first posted about.


#6

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.


#7

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 :slight_smile:

[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

#8

Finally we got a proper error.

Does this

file really not exist?

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.


#9

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 :confused:


#10

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)


#11

I’ll try this later when I’m back on my computer. Thanks for your help I’ll let you know if this resolves the issue :slight_smile:


#12

Sorry I know this is a dead thread but I’m still getting this. Any other help?