Unhandled promise rejection warning in Ionic 2.0.0-rc.4


#1

Hi,

I am trying to follow the steps to update my project to rc.4, but for some reason after update ionic I am getting this warning when build in production:

ionic build ios --prod

[11:05:59] ionic-app-scripts 0.0.47
[11:05:59] build prod started …
[11:05:59] clean started …
[11:05:59] clean finished in 7 ms
[11:05:59] copy started …
[11:05:59] ngc started …
[11:06:10] ngc finished in 10.58 s
[11:06:10] webpack started …
(node:33513) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token u in JSON at position 0
[11:06:10] copy finished in 10.76 s

Any help?

Thanks.


#2

If you’re running unstable versions of Node, I would recommend going back to 6.9.2.


#3

No, no, I am using 6.7.0. Should I try 6.9.2?

When I build in production, my app is not working anymore…no main.js…


#4

Hmm, I thought the unhandled promise rejection warning was only in newest versions of node. In any event, the ultimate cause looks like a wonky .json file somewhere.


#5

Maybe a library or component, because I am not using any .json file.

I will check. Thank you.


#6

The same problem using 6.9.2 and I can’t find any json :S