Closed ahmerrkhanzz closed 6 years ago
hi, It requires typescript 2.5+ try updating to 2.6.2 & do fresh npm install
Still not working after typescript version update to 2.6.2, giving the same error.
This error is cause by running mismatched versions of angular packages. It looks like you have 5.1.1
for some angular packages and 5.0.0
for others. Please ensure that all of your angular packages are using matching/compatible.
You will then need to clear your node_modules
and do a fresh npm install
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Bug, feature request, or proposal:
Bug
What is the expected behavior?
It should serve the app
What is the current behavior?
Its giving error of "Metadata version mismatch"
I have upgraded my application from angular 4 to 5 and after resolving all of the major conflicts I stuck at this dead end issue,
ERROR in Error: Metadata version mismatch for module /Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/src/app/app.module.ts, found version 3, expected 4 at StaticSymbolResolver.getModuleMetadata (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@angular/compiler/bundles/compiler.umd.js:29622:34) at StaticSymbolResolver._createSymbolsOf (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@angular/compiler/bundles/compiler.umd.js:29354:46) at StaticSymbolResolver.resolveSymbol (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@angular/compiler/bundles/compiler.umd.js:29013:14) at StaticReflector.findSymbolDeclaration (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@angular/compiler/bundles/compiler.umd.js:31531:67) at StaticReflector.findDeclaration (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@angular/compiler/bundles/compiler.umd.js:31506:21) at Object.listLazyRoutesOfModule (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@angular/compiler-cli/src/ngtools_impl.js:51:37) at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39) at AotPlugin._getLazyRoutesFromNgtools (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@ngtools/webpack/src/plugin.js:241:66) at _donePromise.Promise.resolve.then.then.then.then.then (/Users/ws23/Projects/csn-demo/cab-startup-new-backoffice/node_modules/@ngtools/webpack/src/plugin.js:495:24) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7)
Here is my package.json file:
"dependencies": { "@angular/animations": "5.1.1", "@angular/cdk": "^5.0.0-rc0", "@angular/common": "5.1.1", "@angular/compiler": "5.1.1", "@angular/core": "5.1.1", "@angular/flex-layout": "2.0.0-beta.10-4905443", "@angular/forms": "5.1.1", "@angular/http": "5.1.1", "@angular/material": "^5.0.0-rc0", "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/platform-server": "^5.0.0", "@angular/router": "^5.0.0", "@cloudinary/angular": "^2.1.1", "@ngui/datetime-picker": "^0.16.2", "@ngx-translate/core": "^9.0.2", "@swimlane/ngx-datatable": "7.2.1", "angular-2-local-storage": "^1.0.1", "angular-calendar": "0.13.0", "angular-material-expansion-panel": "^0.7.2", "angular-tree-component": "3.2.4", "angular2-csv": "^0.2.5", "angular2-image-upload": "^1.0.0-rc.0", "angular2-image-zoom": "^1.2.1", "angular2-material-datepicker": "^0.5.0", "chart.js": "2.5.0", "core-js": "2.4.1", "d3": "4.7.4", "dragula": "3.7.2", "hammerjs": "2.0.8", "i": "^0.3.6", "intl": "1.2.4", "jquery": "^3.2.1", "leaflet": "^1.0.2", "lodash": "^4.17.4", "moment": "^2.15.0", "ng-pick-datetime": "^5.0.0-beta.14", "ng2-charts": "1.5.0", "ng2-cloudinary": "^0.9.2", "ng2-dragula": "1.3.0", "ng2-expansion-panels": "0.0.6", "ng2-file-upload": "1.2.0", "ng2-image-hover-zoom": "^1.0.2", "ng2-timezone-selector": "^0.1.4", "ng2-translate": "5.0.0", "ng2-validation": "3.9.1", "ngx-delete-confirm": "0.0.4", "node-sass": "^3.13.1", "path-is-inside": "^1.0.2", "perfect-scrollbar": "^0.6.16", "primeng": "^4.2.0-rc.1", "quill": "1.2.3", "rxjs": "^5.5.6", "screenfull": "^3.0.2", "select2": "^4.0.6-rc.1", "universalify": "^0.1.1", "zone.js": "0.8.5" }, "devDependencies": { "@angular/cli": "^1.4.9", "@angular/compiler-cli": "^4.2.4", "@types/jasmine": "2.5.47", "@types/node": "6.0.60", "codelyzer": "2.0.0", "jasmine-core": "2.5.2", "jasmine-spec-reporter": "3.2.0", "karma": "1.5.0", "karma-chrome-launcher": "2.0.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "0.2.0", "karma-jasmine": "1.1.0", "karma-jasmine-html-reporter": "0.2.2", "protractor": "5.0.0", "ts-node": "3.0.2", "tslint": "4.5.0", "typescript": "^2.4.2" }