在Ionic应用程序中进行生产构建期间,出现此错误:
Error: Metadata version mismatch for module C:/Users/p/Desktop/p/trunk/p/Work/node_modules/ionic2-calendar/calendar.module.d.ts, found version 4, expected 3
这是我的package.json
,看起来不错吗?
{
"name": "ggggg",
"author": "Chris",
"homepage": "none",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"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",
"@ionic-native/core": "3.9.2",
"@ionic-native/in-app-browser": "3.9.2",
"@ionic-native/keyboard": "^3.9.2",
"@ionic-native/local-notifications": "3.9.2",
"@ionic-native/network": "3.9.2",
"@ionic-native/splash-screen": "3.9.2",
"@ionic-native/status-bar": "3.9.2",
"@ionic/cloud-angular": "^0.12.0",
"@ionic/storage": "2.0.1",
"chart.js": "^2.7.0",
"cordova-android": "6.2.3",
"cordova-browser": "5.0.0",
"cordova-ios": "4.4.0",
"cordova-plugin-app-event": "1.2.0",
"cordova-plugin-compat": "^1.1.0",
"crypto-js": "3.1.9-1",
"de.appplant.cordova.plugin.local-notification": "~0.8.5",
"intl": "^1.2.5",
"ionic": "^3.12.0",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "2.2.1",
"ionic2-calendar": "^0.4.4",
"ionicons": "3.0.0",
"lodash": "^4.17.4",
"patternomaly": "^1.3.0",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "^3.1.10",
"typescript": "2.3.2"
},
"cordovaPlatforms": [],
"description": "Gme",
"cordova": {
"platforms": [
"android",
"browser",
"ios"
]
}
}
可能是什么原因?我知道这与版本控制有关,但仍然找不到解决方案。
我曾尝试将ionic的版本从4降级到3。但这无济于事。
答案 0 :(得分:0)
解决方案只是将ng-bootstrap更新到beta.6版本。 请尝试使用此命令
npm install @ ng-bootstrap / ng-bootstrap @ 1.0.0-beta.6 --save