I am getting the below error when trying to build and only if I try to access a specific page(event page). All other pages work fine. Sorry for the long post, but I don't know how to fix this. I removed the ios and android platorms ionic cordova platform rm ios
, cleaned npm cache, but nothing.
What's weird is that I cleaned the event page, removed the ios app ionic cordova platform rm ios
and added it back ... add ios
. With nothing in it, the error still showed <ion-header no-border [class]="headerBackgroundClass">
even though I removed [class]="headerBackgroundClass"
. That's when I cleaned npm cache. But it still didn't work
I don't know what else to try.
Only thing I can think of is updating ionic webview to "cordova-plugin-ionic-webview": "^4.0.0",
from "cordova-plugin-ionic-webview": "^1.1.19",
[12:48:28] ionic-app-script task: "build"
[12:48:28] Error: ./src/pages/event/event Module parse failed: Unexpected token (1:0) You may need an appropriate
loader to handle this file type. | <ion-header no-border [class]="headerBackgroundClass"> | <ion-navbar> |
<ion-title *ngIf="showTitle == true"> @ ./src/pages/event/event.module.ts 9:0-36 @ ./src lazy @
./node_modules/ionic-angular/util/ng-module-loader.js @ ./node_modules/ionic-angular/module.js @
./node_modules/ionic-angular/index.js @ ./src/app/app.module.ts @ ./src/app/main.ts
Error: ./src/pages/event/event
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
| <ion-header no-border [class]="headerBackgroundClass">
| <ion-navbar>
| <ion-title *ngIf="showTitle == true">
@ ./src/pages/event/event.module.ts 9:0-36
@ ./src lazy
@ ./node_modules/ionic-angular/util/ng-module-loader.js
@ ./node_modules/ionic-angular/module.js
@ ./node_modules/ionic-angular/index.js
@ ./src/app/app.module.ts
@ ./src/app/main.ts
package.json
"dependencies": {
"@angular/animations": "5.2.10",
"@angular/common": "5.2.10",
"@angular/compiler": "5.2.10",
"@angular/compiler-cli": "5.2.10",
"@angular/core": "5.2.10",
"@angular/forms": "5.2.10",
"@angular/http": "5.2.10",
"@angular/platform-browser": "5.2.10",
"@angular/platform-browser-dynamic": "5.2.10",
"@ionic-native/camera": "^4.11.0",
"@ionic-native/core": "4.7.0",
"@ionic-native/crop": "^4.12.0",
"@ionic-native/file": "^4.12.0",
"@ionic-native/google-plus": "^4.20.0",
"@ionic-native/image-resizer": "^4.12.0",
"@ionic-native/in-app-browser": "^4.17.0",
"@ionic-native/native-page-transitions": "^4.18.0",
"@ionic-native/onesignal": "^4.7.0",
"@ionic-native/splash-screen": "4.7.0",
"@ionic-native/status-bar": "^4.7.0",
"@ionic/storage": "2.1.3",
"angularfire2": "5.0.0-rc.6",
"com.telerik.plugins.nativepagetransitions": "^0.6.5",
"cordova-android": "7.1.4",
"cordova-ios": "4.5.5",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-crop": "^0.4.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-googleplus": "7.0.0",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^4.0.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"firebase": "4.12.1",
"info.protonet.imageresizer": "^0.1.1",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"moment": "^2.22.1",
"onesignal-cordova-plugin": "^2.3.3",
"rxjs": "5.5.10",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"config": {
"ionic_source_map": "source-map"
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.3",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"onesignal-cordova-plugin": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-camera": {},
"cordova-plugin-crop": {},
"info.protonet.imageresizer": {},
"cordova-plugin-file": {},
"cordova-plugin-inappbrowser": {},
"com.telerik.plugins.nativepagetransitions": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "com.googleusercontent.apps.416295325641-b5d4bj8rn8f1o1siil6ri492dbtb1h2r",
"PLAY_SERVICES_VERSION": "11.8.0"
}
},
"platforms": [
"android",
"ios"
]
event.module.ts
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { EventPage } from './event';
import { SaferPipe } from '../../pipes/safer.pipe';
import { Underscore } from '../../pipes/underscore.pipe';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { NativePageTransitions } from '@ionic-native/native-page-transitions';
import { DaysPipe } from '../../pipes/days.pipe';
import { HourPipe } from '../../pipes/hour.pipe';
@NgModule({
declarations: [
EventPage,
SaferPipe,
Underscore,
DaysPipe,
HourPipe
],
providers: [
InAppBrowser,
NativePageTransitions
],
imports: [
IonicPageModule.forChild(EventPage),
],
})
export class EventPageModule { }
from Ionic build error - Module parse failed: Unexpected token (1:0) You may need an appropriate
0 komentar:
Posting Komentar