当我运行ionic serve -b
时,突然我的Ionic 3项目开始显示这些错误,我不记得我从昨天到今天都做了什么不同,并且昨天它还在工作。
> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] [12:52:41] ionic-app-scripts 3.2.2
[app-scripts] [12:52:41] watch started ...
[app-scripts] [12:52:41] build dev started ...
[app-scripts] [12:52:41] clean started ...
[app-scripts] [12:52:41] clean finished in 5 ms
[app-scripts] [12:52:41] copy started ...
[app-scripts] [12:52:41] deeplinks started ...
[app-scripts] [12:52:42] deeplinks finished in 546 ms
[app-scripts] [12:52:42] transpile started ...
[app-scripts] [12:52:51] typescript: node_modules/@angular/common/http/src/response.d.ts, line: 253
[app-scripts] [12:52:51] typescript: node_modules/@angular/common/http/src/response.d.ts, line: 259
[app-scripts] [12:52:51] typescript: node_modules/@angular/common/src/directives/ng_if.d.ts, line: 122
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/application_init.d.ts, line: 26
[app-scripts] Initializers are not allowed in ambient contexts.
[app-scripts] L252: readonly ok = false;
[app-scripts] L253: constructor(init: {
[app-scripts] L254: error?: any;
[app-scripts] Initializers are not allowed in ambient contexts.
[app-scripts] L258: url?: string;
[app-scripts] L259: });
[app-scripts] Cannot find name 'NonNullable'.
[app-scripts] L121: $implicit: any;
[app-scripts] L122: ngIf: any;
[app-scripts] Initializers are not allowed in ambient contexts.
[app-scripts] A 'const' initializer in an ambient context must be a string or numeric literal.
[app-scripts] L11: export declare const R3_COMPILE_NGMODULE_DEFS: typeof compileNgModuleDefs;
[app-scripts] L12: export declare const R3_PATCH_COMPONENT_DEF_WTIH_SCOPE: typeof patchComponentDefWithScope;
[app-scripts] A 'const' initializer in an ambient context must be a string or numeric literal.
[app-scripts] L18: export declare let R3_COMPILE_NGMODULE_DEFS: DirectiveCompiler;
[app-scripts] L19: export declare let R3_PATCH_COMPONENT_DEF_WTIH_SCOPE: DirectiveCompiler;
[app-scripts] Initializers are not allowed in ambient contexts.
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/ivy_switch/compiler/ivy_switch_on.d.ts, line: 12
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/ivy_switch/compiler/legacy.d.ts, line: 19
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/linker/query_list.d.ts, line: 36
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 37
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 45
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 50
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 55
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 60
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 70
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 72
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/container.d.ts, line: 93
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/player.d.ts, line: 75
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/player.d.ts, line: 76
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/player.d.ts, line: 77
[app-scripts] L36: * See
[app-scripts] L37: * [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L36: * are no longer required.
[app-scripts] L38: [VIEWS]: LViewData[];
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L45: * This allows us to jump from a container to a sibling container or component
[app-scripts] L46: * view with the same parent, so we can remove listeners efficiently.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L50: * Queries active for this container - all the views inserted to / removed from
[app-scripts] L51: * this container are reported to queries referenced here.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L55: * The host element of this LContainer.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L60: * It could also be a styling context if this is a node with a style/class
[app-scripts] L61: * binding.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L70: * If `renderParent` is `null` it is headless. This means that it is contained
[app-scripts] L71: * in another view which in turn is contained in another container and
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L71: * in another view which in turn is contained in another container and
[app-scripts] L72: * therefore it does not yet have its own parent.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L74: * When present all animation players will be passed into the flush method below.
[app-scripts] L75: * This feature is designed to service application-wide animation testing, live
[app-scripts] L76: * debugging as well as custom animation choreographing tools.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L75: * This feature is designed to service application-wide animation testing, live
[app-scripts] L76: * debugging as well as custom animation choreographing tools.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L76: * debugging as well as custom animation choreographing tools.
[app-scripts] L78: export interface PlayerHandler {
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/player.d.ts, line: 78
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/player.d.ts, line: 79
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 123
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 127
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 131
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 137
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 143
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 147
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 152
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/styling.d.ts, line: 159
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 56
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 58
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 67
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 77
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 79
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 85
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 96
[app-scripts] L78: export interface PlayerHandler {
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L78: export interface PlayerHandler {
[app-scripts] L80: * Designed to kick off the player at the end of change detection
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L122: * Location of initial data shared by all instances of this style.
[app-scripts] L124: [StylingIndex.InitialStylesPosition]: InitialStyles;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L126: * A numeric value representing the configuration status (whether the context is dirty or not)
[app-scripts] L127: * mixed together (using bit shifting) with a index value which tells the starting index value
[app-scripts] L128: * of where the multi style entries begin.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L130: [StylingIndex.MasterFlagPosition]: number;
[app-scripts] L132: * A numeric value representing the class index offset value. Whenever a single class is
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L136: [StylingIndex.ClassOffsetPosition]: number;
[app-scripts] L138: * Location of element that is used as a target for this context.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L142: * The last class value that was interpreted by elementStylingMap. This is cached
[app-scripts] L143: * So that the algorithm can exit early incase the value has not changed.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L146: [key: string]: any;
[app-scripts] L147: } | string | null;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L152: [StylingIndex.PreviousMultiStyleValue]: {
[app-scripts] L153: [key: string]: any;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L158: * the context during allocation. The 0th value must be null so that index values of `0` within
[app-scripts] L159: * the context flags can always point to a null value safely when nothing is set.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L55: * views as it is recursively rendering templates.
[app-scripts] L57: * This is the "insertion" view for embedded views. This allows us to properly
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L57: * This is the "insertion" view for embedded views. This allows us to properly
[app-scripts] L58: * destroy embedded views.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L66: * container. Embedded views already have a node.next, but it is only set for
[app-scripts] L67: * views in the same container. We need a way to link component views and views
[app-scripts] L68: * across containers as well.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L76: * If this is an embedded view, HOST will be null.
[app-scripts] L78: [HOST]: RElement | StylingContext | null;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L78: [HOST]: RElement | StylingContext | null;
[app-scripts] L80: * Pointer to the `TViewNode` or `TElementNode` which represents the root of the view.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L85: * If `TElementNode`, this is the LView of a component.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L95: * a setter that creates an embedded view, like in ngIf).
[app-scripts] L97: [BINDING_INDEX]: number;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L103: * These change per LView instance, so they cannot be stored on TView. Instead,
[app-scripts] L104: * TView.cleanup saves an index to the necessary context in this array.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L112: * - For inline views, the context is null.
[app-scripts] L114: [CONTEXT]: {} | RootContext | null;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L120: [SANITIZER]: Sanitizer | null;
[app-scripts] L122: * The last LViewData or LContainer beneath this LViewData in the hierarchy.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 104
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 113
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 121
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 123
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 125
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 127
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 134
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 143
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 149
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/render3/interfaces/view.d.ts, line: 174
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/sanitization/bypass.d.ts, line: 23
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/sanitization/bypass.d.ts, line: 31
[app-scripts] L122: * The last LViewData or LContainer beneath this LViewData in the hierarchy.
[app-scripts] L124: * The tail allows us to quickly add a new state to the end of the view list
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L124: * The tail allows us to quickly add a new state to the end of the view list
[app-scripts] L125: * without having to propagate starting from the first child.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L127: [TAIL]: LViewData | LContainer | null;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L133: * containers because their parent cannot be stored on the TViewNode (views may be inserted
[app-scripts] L134: * in multiple containers, so the parent cannot be shared between view instances).
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L142: [CONTENT_QUERIES]: QueryList<any>[] | null;
[app-scripts] L144: * View where this view's template was declared.
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L148: * The template for a dynamically created view may be declared in a different view than
[app-scripts] L149: * it is inserted. We already track the "insertion view" (view where the template was
[app-scripts] L150: * inserted) in LViewData[PARENT], but we also need access to the "declaration view"
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L174: * This must be stored in the view rather than using `data` as a marker so that
[app-scripts] L175: * we can properly support embedded views. Otherwise, when exiting a child view
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L23: export interface TrustedHtmlString extends TrustedString {
[app-scripts] L24: [BRAND]: BypassType.Html;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/sanitization/bypass.d.ts, line: 39
[app-scripts] L31: export interface TrustedStyleString extends TrustedString {
[app-scripts] L32: [BRAND]: BypassType.Style;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L39: export interface TrustedScriptString extends TrustedString {
[app-scripts] L40: [BRAND]: BypassType.Script;
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/sanitization/bypass.d.ts, line: 47
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L47: export interface TrustedUrlString extends TrustedString {
[app-scripts] L48: [BRAND]: BypassType.Url;
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/sanitization/bypass.d.ts, line: 55
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] L55: export interface TrustedResourceUrlString extends TrustedString {
[app-scripts] L56: [BRAND]: BypassType.ResourceUrl;
[app-scripts] A computed property name in an interface must directly refer to a built-in symbol.
[app-scripts] [12:52:51] typescript: node_modules/@angular/core/src/sanitization/bypass.d.ts, line: 63
[app-scripts] L62: * This function wraps the trusted string in `String` and brands it in a way which makes it
[app-scripts] L63: * recognizable to {@link htmlSanitizer} to be trusted implicitly.
我想知道它是否与Angular或Typescript有关,但与上次运行没有问题,我真的没有什么不同。
这是我的离子信息:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/Users/francisco/.npm-packages/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.2
Cordova:
cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 27 other plugins)
System:
ios-deploy : 2.0.0
ios-sim : 6.0.0
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
package.json 依赖项:
"dependencies": {
"@angular/animations": "7.0.1",
"@angular/common": "7.0.1",
"@angular/compiler": "7.0.1",
"@angular/compiler-cli": "7.0.1",
"@angular/core": "7.0.1",
"@angular/forms": "7.0.1",
"@angular/http": "7.0.1",
"@angular/platform-browser": "7.0.1",
"@angular/platform-browser-dynamic": "7.0.1",
"@angular/platform-server": "7.0.1",
"@angular/router": "7.0.1",
"@ionic-native/android-permissions": "4.20.0",
"@ionic-native/background-geolocation": "4.20.0",
"@ionic-native/barcode-scanner": "4.20.0",
"@ionic-native/camera": "4.20.0",
"@ionic-native/contacts": "4.20.0",
"@ionic-native/core": "4.20.0",
"@ionic-native/device": "4.20.0",
"@ionic-native/email-composer": "4.20.0",
"@ionic-native/facebook": "4.20.0",
"@ionic-native/file": "4.20.0",
"@ionic-native/geolocation": "4.20.0",
"@ionic-native/globalization": "4.20.0",
"@ionic-native/google-maps": "4.15.1",
"@ionic-native/google-plus": "4.16.0",
"@ionic-native/keyboard": "4.16.0",
"@ionic-native/linkedin": "^4.16.0",
"@ionic-native/media": "4.16.0",
"@ionic-native/native-audio": "4.16.0",
"@ionic-native/native-geocoder": "4.16.0",
"@ionic-native/native-page-transitions": "4.16.0",
"@ionic-native/network": "4.16.0",
"@ionic-native/push": "4.16.0",
"@ionic-native/social-sharing": "4.16.0",
"@ionic-native/splash-screen": "4.16.0",
"@ionic-native/sqlite": "4.16.0",
"@ionic-native/status-bar": "4.16.0",
"@ionic-native/streaming-media": "4.16.0",
"@ionic-native/twitter-connect": "4.16.0",
"@ionic/storage": "2.2.0",
"@ngrx/effects": "^5.2.0",
"@ngrx/router-store": "^6.1.2",
"@ngrx/store": "^5.2.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@techiediaries/ngx-qrcode": "0.0.5",
"android-versions": "^1.3.0",
"angular-progress-bar": "^1.0.9",
"angular2-text-mask": "^9.0.0",
"angularfire2": "^4.0.0-rc0",
"com.googlemaps.ios": "https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk",
"com.telerik.plugins.nativepagetransitions": "^0.6.5",
"cordova-android": "^7.1.4",
"cordova-android-support-gradle-release": "^2.0.1",
"cordova-browser": "^5.0.4",
"cordova-ios": "^4.5.5",
"cordova-plugin-add-swift-support": "^1.7.1",
"cordova-plugin-android-permissions": "^1.0.0",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-contacts": "^3.0.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-email-composer": "^0.8.15",
"cordova-plugin-facebook4": "^3.2.0",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",
"cordova-plugin-googleplus": "^5.3.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^2.2.5",
"cordova-plugin-linkedin": "^1.2.1",
"cordova-plugin-mauron85-background-geolocation": "^3.0.0-alpha.50",
"cordova-plugin-media": "^5.0.2",
"cordova-plugin-nativeaudio": "^3.0.9",
"cordova-plugin-nativegeocoder": "^3.1.3",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-streaming-media": "^2.2.0",
"cordova-plugin-swift-support": "^3.1.1",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.3",
"cordova-sqlite-storage": "^2.5.2",
"es6-promise-plugin": "^4.2.2",
"firebase": "^3.9.0",
"font-awesome": "^4.7.0",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic-tooltips": "^2.1.1",
"ionicons": "4.4.6",
"phonegap-plugin-barcodescanner": "^8.0.1",
"phonegap-plugin-push": "^2.2.3",
"promise-polyfill": "^8.1.0",
"run": "^1.4.0",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3",
"sw-toolbox": "3.6.0",
"twitter-connect-plugin": "git+https://github.com/chroa/twitter-connect-plugin.git",
"web-animations-js": "^2.3.1",
"zone.js": "0.8.26"
},
"devDependencies": {
"@angular/cli": "^7.3.3",
"@ionic/app-scripts": "3.2.2",
"typescript": "^3.3.3333"
},