错误:模块的元数据版本不匹配,animations.d.ts,找到版本4,预期为3

时间:2017-12-31 09:45:13

标签: cordova ionic-framework ionic2 ionic3

离子环境:

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.0.0
    Cordova Platforms  : android 6.4.0
    Ionic Framework    : ionic-angular 3.7.1

System:

    Android SDK Tools : 26.1.1
    Node              : v6.11.2
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\anikumar\AppData\Local\Android-SDK

Misc:

    backend : legacy

我在构建发布时遇到以下错误。

  

错误:模块D的元数据版本不匹配:/Test/FindJunk/node_modules/@angular/animations/animations.d.ts,发现版本4,预期3           在StaticSymbolResolver.getModuleMetadata(D:\ Test \ FindJunk \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:25748:34)           在StaticSymbolResolver._createSymbolsOf(D:\ Test \ FindJunk \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:25536:46)           在StaticSymbolResolver.getSymbolsOf(D:\ Test \ FindJunk \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:25517:14)           在D:\ Test \ FindJunk \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:24376:30           at Array.forEach(native)           在extractProgramSymbols(D:\ Test \ FindJunk \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:24375:79)           在AotCompiler.analyzeModulesAsync(D:\ Test \ MyApp \ node_modules \ @angular \ compiler \ bundles \ compiler.umd.js:23931:47)           在CodeGenerator.codegen(D:\ Test \ FindJunk \ node_modules \ @angular \ compiler-cli \ src \ codegen.js:32:14)           在Function.NgTools_InternalApi_NG_2.codeGen(D:\ Test \ FindJunk \ node_modules \ @angular \ compiler-cli \ src \ ngtools_api.js:73:30)           at Object.doCodegen(D:\ Test \ FindJunk \ node_modules \ @ionic \ app-scripts \ dist \ aot \ codegen.js:6:51)

package.json 插件

"@angular/animations": "^5.1.2",
    "@angular/common": "4.4.3",
    "@angular/compiler": "4.4.3",
    "@angular/compiler-cli": "4.4.3",
    "@angular/core": "4.4.3",
    "@angular/forms": "4.4.3",
    "@angular/http": "4.4.3",
    "@angular/material": "^5.0.2",
    "@angular/platform-browser": "4.4.3",
    "@angular/platform-browser-dynamic": "4.4.3",
    "@ionic-native/core": "^4.3.0",
    "@ionic-native/device-accounts": "^4.5.2",
    "@ionic-native/diagnostic": "^4.4.2",
    "@ionic-native/file": "^4.4.2",
    "@ionic-native/file-transfer": "^4.3.1",
    "@ionic-native/geolocation": "^4.4.2",
    "@ionic-native/http": "^4.4.2",
    "@ionic-native/image-resizer": "^4.4.2",
    "@ionic-native/network": "^4.4.2",
    "@ionic-native/screen-orientation": "^4.3.1",
    "@ionic-native/splash-screen": "4.3.0",
    "@ionic-native/status-bar": "4.3.0",
    "@ionic-native/unique-device-id": "^4.4.2",
    "@ionic-native/vibration": "^4.5.2",
    "@ionic/storage": "2.0.1",
    "cordova": "^7.1.0",
    "cordova-android": "^6.4.0",
    "cordova-device-accounts": "^1.0.0",
    "cordova-plugin-advanced-http": "^1.8.1",
    "cordova-plugin-camera": "^2.4.1",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-device": "1.1.4",
    "cordova-plugin-file": "^4.3.3",
    "cordova-plugin-file-hash": "^0.4.1",
    "cordova-plugin-file-transfer": "^1.6.3",
    "cordova-plugin-geolocation": "^2.4.3",
    "cordova-plugin-ionic-webview": "^1.1.11",
    "cordova-plugin-network-information": "^1.3.4",
    "cordova-plugin-screen-orientation": "^2.0.1",
    "cordova-plugin-splashscreen": "~4.0.1",
    "cordova-plugin-statusbar": "git+https://github.com/apache/cordova-plugin-statusbar.git",
    "cordova-plugin-uniquedeviceid": "^1.3.2",
    "cordova-plugin-vibration": "^3.0.1",
    "cordova-plugin-whitelist": "1.3.1",
    "cordova.plugins.diagnostic": "^3.7.2",
    "es6-promise-plugin": "git+https://github.com/vstirbu/PromisesPlugin.git",
    "info.protonet.imageresizer": "^0.1.1",
    "ionic-angular": "3.7.1",
    "ionic-image-loader": "^4.2.1",
    "ionic-plugin-keyboard": "~2.2.1",
    "ionic2-zoom-area": "^1.0.14",
    "ionicons": "3.0.0",
    "rxjs": "5.4.3",
    "sw-toolbox": "3.6.0",
    "typescript-collections": "^1.2.5",
    "zone.js": "0.8.18"

我发现了类似的问题/答案,但没有任何对我有用。我添加了离子信息和package.json

1 个答案:

答案 0 :(得分:0)

尝试将动画包版本更改为4.4.3

示例:

"@angular/animations": "4.4.3",