You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
While not with exactly the same code (but minor changes any way) I also see the error on Android:
Project successfully built
Successfully deployed on device with identifier 'emulator-5554'.
JS: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
JS: EXCEPTION: Unexpected end of JSON input
JS: ORIGINAL STACKTRACE:
JS: SyntaxError: Unexpected end of JSON input
JS: at Object.parse (native)
JS: at Response.Body.json (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:40233:25)
JS: at MapSubscriber.project (/data/data/com.hezea.ForSaleByOwner/files/app/bundle.js:2692:46)
JS: at MapSubscriber._next (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:17300:35)
JS: at MapSubscriber.Subscriber.next (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:6044:18)
JS: at /data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:45464:36
JS: at ZoneDelegate.invoke (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:44470:28)
JS: at Object.onInvoke (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:19889:37)
JS: at ZoneDelegate.invoke (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:44469:34)
JS: at Zone.run (/data/data/com.hezea.ForSaleByOwner/files/app/vendor.js:44363:43)
I think is more related to the execution than to the code it self, it means, something get wrong while preparing the build or make the lunch of vendors.
Thanks for sending that project. The error comes from the ng2-translate plugin trying to issue requests and parse localization json files. To fix it, you need two changes:
Add a rule to copy your i18n folder to the device in webpack.common.js. Look for the CopyWebpackPlugin section, and add: { from: "i18n/**" },
Change your translate factory function, so that it uses ~/i18n as the locale files root: return new TranslateStaticLoader(http, "~/i18n");
Despite it does not prevent the application to start, this strange error appears only on iOS:
I created an specific fork for easy reproduction that is available here: https://bitbucket.org/ignaciolarranaga/nativescript-webpack-problems.git
Please checkout the tag problem-1 (I might add more issues if I found them)
The text was updated successfully, but these errors were encountered: