Несоответствие версии метаданных для модуля при создании сборки браузера - PullRequest
0 голосов
/ 20 мая 2019

Я работаю над приложением ionic 3 и получаю сообщение об ошибке ниже с помощью команды " ionic cordova build browser --prod " -

Ошибка: несоответствие версии метаданных для модуля C:/Users/con-backend/Desktop/dev_newRepo/con-dashboard/node_modules/ionic-tooltips/dist/tooltip-box.component.d.ts, найдена версия 4, ожидается 3 Ошибка: несоответствие версии метаданных для модуля C: / Users/consectus-backend/Desktop/devHUB_newRepository/consectus-dashboard/node_modules/ionic-tooltips/dist/tooltip-box.component.d.ts, найдена версия 4, ожидается 3 в StaticSymbolResolver.getModuleMetadata\ Desktop \ devHUB_newRepository \ consectus-dashboard \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js: 24474: 34) в StaticSymbolResolver._createSymbolsOf (C: \ Users \ consectus-backend \ Desktop \ devHUB_new_mode_partory_part@angular \ compiler \ bundles \ compiler.umd.js: 24260: 46) в StaticSymbolResolver.getSymbolsOf (C: \ Users \ consectus-backend \ Desktop \ devHUB_newRepository \ consectus-dashboard \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js: 24241: 14) в C: \ Users \ consectus-backend \ Desktop \ devHUB_newRepository \ consectus-dashboard \ node_modules @ угловой \ compiler \ bundles \compiler.umd.js: 23023: 30 в Array.forEach () в extractProgramSymbols (C: \ Users \ consectus-backend \ Desktop \ devHUB_newRepository \ consectus-dashboard \ node_modules @ angular \ compiler \ bundles \ compiler.umd.js: 23022: 79)

вот мой пакет. Json: -

{
    "name": "ConDashboard",
    "version": "0.0.1",
    "author": "Ionic Framework",
    "homepage": "http://ionicframework.com/",
    "private": true,
    "scripts": {
        "clean": "ionic-app-scripts clean",
        "build": "ionic-app-scripts build",
        "lint": "ionic-app-scripts lint",
        "ionic:build": "ionic-app-scripts build",
        "ionic:serve": "ionic-app-scripts serve"
    },
    "dependencies": {
        "@angular/animations": "4.1.3",
        "@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": "^7.0.4",
        "@ionic-native/core": "^3.12.1",
        "@ionic-native/deeplinks": "^4.20.0",
        "@ionic-native/network": "^3.0.0",
        "@ionic-native/splash-screen": "3.12.1",
        "@ionic-native/status-bar": "3.12.1",
        "@ionic/storage": "2.0.1",
        "@reactivex/rxjs": "^5.5.3",
        "@types/papaparse": "^4.5.2",
        "chart.js": "^2.7.2",
        "cordova-browser": "5.0.4",
        "cordova-plugin-console": "^1.1.0",
        "cordova-plugin-crosswalk-webview": "^2.4.0",
        "cordova-plugin-splashscreen": "^4.1.0",
        "cordova-plugin-statusbar": "^2.4.2",
        "cordova-plugin-whitelist": "^1.3.3",
        "crypto-js": "^3.1.9-1",
        "ionic-angular": "^3.6.0",
        "ionic-plugin-keyboard": "^2.2.1",
        "ionic-tooltips": "^3.0.0",
        "ionicons": "3.0.0",
        "moment": "^2.24.0",
        "moment-duration-format": "^2.2.2",
        "papaparse": "^4.6.0",
        "rxjs": "^5.5.12",
        "sw-toolbox": "3.6.0",
        "zone.js": "0.8.12"
    },
    "devDependencies": {
        "@ionic/app-scripts": "2.1.4",
        "node-sass": "^4.11.0",
        "typescript": "2.3.4"
    },
    "description": "An Ionic project",
    "cordova": {
        "plugins": {
            "cordova-plugin-console": {},
            "cordova-plugin-splashscreen": {},
            "cordova-plugin-statusbar": {},
            "cordova-plugin-whitelist": {},
            "ionic-plugin-keyboard": {},
            "cordova-plugin-crosswalk-webview": {}
        },
        "platforms": [
            "browser"
        ]
    }
}

1 Ответ

0 голосов
/ 20 мая 2019

Я внес изменения в узел modules/@angular/compiler.bundles/complire.umd, потому что возникли проблемы при создании сборки prod (ionic cordova build browser --prod), поэтому я добавил ложное условие в приведенное ниже условие if.Andэто решило проблему.

if (moduleMetadata['version'] != SUPPORTED_SCHEMA_VERSION && false) {
                var /** @type {?} */ errorMessage = moduleMetadata['version'] == 2 ?
                    "Unsupported metadata version " + moduleMetadata['version'] + " for module " + module + ". This module should be compiled with a newer version of ngc" :
                    "Metadata version mismatch for module " + module + ", found version " + moduleMetadata['version'] + ", expected " + SUPPORTED_SCHEMA_VERSION;
                this.reportError(new Error(errorMessage));
            }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...