离子构建中的错误“在静态解析符号值时遇到错误”

时间:2018-06-01 07:26:23

标签: ionic2

我刚刚在另一个系统上克隆了一个离子项目并运行npm install之后构建项目我运行离子cordova build android --prod --release。 它抛出一个错误。 “错误:静态解析符号值时遇到错误。调用函数'ɵmakeDecorator',不支持函数调用。请考虑用导出函数替换函数或lambda,解析符号Injectable in ...

我已尝试使用以下解决方案

"compilerOptions": {
  ...
  "paths": { "@angular/*": ["../node_modules/@angular/*"] }
}

添加tsconfig文件。但对我不起作用。

下面提到了项目依赖性。

"dependencies": {
        "@angular/common": "4.1.3",
        "@angular/compiler": "4.1.3",
        "@angular/compiler-cli": "4.1.3",
        "@angular/core": "4.1.3",
        "@angular/forms": "4.1.3",
        "@angular/http": "4.1.3",
        "@angular/platform-browser": "4.1.3",
        "@angular/platform-browser-dynamic": "4.1.3",
        "@angular/router": "^4.4.0-RC.0",
        "@ionic-native/core": "3.12.1",
        "@ionic-native/device": "^4.3.1",
        "@ionic-native/device-orientation": "^4.3.1",
        "@ionic-native/diagnostic": "^4.3.1",
        "@ionic-native/flashlight": "^4.3.1",
        "@ionic-native/geolocation": "^4.3.1",
        "@ionic-native/keyboard": "^4.2.1",
        "@ionic-native/splash-screen": "3.12.1",
        "@ionic-native/status-bar": "3.12.1",
        "@ionic-native/themeable-browser": "^4.5.2",
        "@ionic/storage": "2.0.1",
        "angular2-moment": "^1.7.0",
        "cordova-android": "^6.2.3",
        "cordova-ios": "^4.4.0",
        "cordova-plugin-console": "^1.0.5",
        "cordova-plugin-device": "^1.1.4",
        "cordova-plugin-device-orientation": "^1.0.7",
        "cordova-plugin-flashlight": "^3.2.0",
        "cordova-plugin-geolocation": "^2.4.3",
        "cordova-plugin-ionic-webview": "^1.1.16",
        "cordova-plugin-splashscreen": "^4.0.3",
        "cordova-plugin-statusbar": "^2.2.2",
        "cordova-plugin-themeablebrowser": "^0.2.17",
        "cordova-plugin-whitelist": "^1.3.1",
        "cordova.plugins.diagnostic": "^3.7.1",
        "es6-promise-plugin": "git+https://github.com/vstirbu/PromisesPlugin.git",
        "ionic-angular": "3.6.0",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionicons": "3.0.0",
        "rxjs": "5.4.0",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.12"
    }

0 个答案:

没有答案