I'm writing an app with NativeScript 6.4.1 and Angular 8.
I followed the instructions on the readme file to install this plugin and I keep getting an error.
npm i @ngx-translate/core --save
npm i @danvick/ngx-translate-nativescript-loader --save
export function createTranslateLoader() {
return new NativeScriptLoader("./assets/i18n/", ".json");
}
@NgModule({
bootstrap: [
AppComponent
],
imports: [
NativeScriptHttpClientModule,
NativeScriptFormsModule,
NativeScriptModule,
AppRoutingModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: createTranslateLoader
}
})
],
Webpack compilation complete. Watching for file changes.
Webpack build done!
Successfully transferred bundle.91f370336d7ada04715a.hot-update.js on device emulator-5554.
Successfully transferred 91f370336d7ada04715a.hot-update.json on device emulator-5554.
JS: HMR: Checking for updates to the bundle with hmr hash 91f370336d7ada04715a.
JS: HMR: The following modules were updated:
JS: HMR: โป ./app/app.module.ts
JS: HMR: Successfully applied update with hmr hash 91f370336d7ada04715a. App is up to date.
Refreshing application on device emulator-5554...
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: ERROR SyntaxError: Unexpected end of JSON input
Successfully synced application org.nativescript.translationsTest1 on device emulator-5554.
JS: ERROR SyntaxError: Unexpected end of JSON input