question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error after installing material plugin

See original GitHub issue

I am getting the below error during ng build or even ng run This error vanishes when I uninstall the @angular/material plugin

ERROR in Error: Metadata version mismatch for module /Volumes/Local Disk/Client Projects/MYP/myp-dashboard/src/app/app.module.ts, found version 3, expected 4
    at StaticSymbolResolver.getModuleMetadata (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@angular/compiler/bundles/compiler.umd.js:31822:34)
    at StaticSymbolResolver._createSymbolsOf (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@angular/compiler/bundles/compiler.umd.js:31579:46)
    at StaticSymbolResolver.resolveSymbol (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@angular/compiler/bundles/compiler.umd.js:31238:14)
    at StaticReflector.findSymbolDeclaration (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@angular/compiler/bundles/compiler.umd.js:30355:67)
    at StaticReflector.findDeclaration (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@angular/compiler/bundles/compiler.umd.js:30330:21)
    at Object.listLazyRoutesOfModule (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@angular/compiler-cli/src/ngtools_impl.js:51:37)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@ngtools/webpack/src/plugin.js:241:66)
    at _donePromise.Promise.resolve.then.then.then.then.then (/Volumes/Local Disk/Client Projects/MYP/myp-dashboard/node_modules/@ngtools/webpack/src/plugin.js:495:24)
    at <anonymous>

Here’s my package.json

“dependencies”: { “@angular/animations”: “^5.0.0”, “@angular/cdk”: “^5.0.0-rc0”, “@angular/common”: “^5.0.2”, “@angular/compiler”: “^5.0.2”, “@angular/core”: “^5.0.2”, “@angular/forms”: “^5.0.2”, “@angular/http”: “^5.0.2”, “@angular/material”: “2.0.0-beta.12”, “@angular/platform-browser”: “^5.0.2”, “@angular/platform-browser-dynamic”: “^5.0.2”, “@angular/platform-server”: “^5.0.2”, “@angular/router”: “^5.0.2”, “arrive”: “^2.4.1”, “bootstrap”: “^3.3.7”, “bootstrap-material-design”: “^0.5.10”, “bootstrap-notify”: “^3.1.3”, “chartist”: “^0.11.0”, “classlist.js”: “^1.1.20150312”, “core-js”: “^2.5.1”, “googleapis”: “^22.2.0”, “jquery”: “^3.2.1”, “moment”: “^2.19.2”, “ng-cli”: “^0.7.0”, “perfect-scrollbar”: “^1.2.0”, “rxjs”: “^5.5.2”, “web-animations-js”: “^2.3.1”, “zone.js”: “^0.8.18” }

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jelbourncommented, Nov 19, 2017

Check out the package.json for our docs site: https://github.com/angular/material.angular.io/blob/master/package.json

Also try clearing both node_modules and your package-lock.json.

Closing this since it seems to be an environment issue.

1reaction
kkrishnan90commented, Nov 18, 2017

I changed as per your comment. Still facing the same issue.

here’s my package.json again…

“dependencies”: { “@angular/cdk”: “^5.0.0-rc0”, “@angular/common”: “^5.0.2”, “@angular/compiler”: “^5.0.2”, “@angular/core”: “^5.0.2”, “@angular/forms”: “^5.0.2”, “@angular/http”: “^5.0.2”, “@angular/material”: “^5.0.0-rc0”, “@angular/platform-browser”: “^5.0.2”, “@angular/platform-browser-dynamic”: “^5.0.2”, “@angular/platform-server”: “^5.0.2”, “@angular/router”: “^5.0.2”, “arrive”: “^2.4.1”, “bootstrap”: “^3.3.7”, “bootstrap-material-design”: “^0.5.10”, “bootstrap-notify”: “^3.1.3”, “chartist”: “^0.11.0”, “classlist.js”: “^1.1.20150312”, “core-js”: “^2.5.1”, “googleapis”: “^22.2.0”, “jquery”: “^3.2.1”, “moment”: “^2.19.2”, “ng-cli”: “^0.7.0”, “perfect-scrollbar”: “^1.2.0”, “rxjs”: “^5.5.2”, “web-animations-js”: “^2.3.1”, “zone.js”: “^0.8.18” }, “devDependencies”: { “@angular/cli”: “1.5.0”, “@angular/compiler-cli”: “4.4.4”, “@angular/material”: “^5.0.0-rc0”, “@types/bootstrap”: “3.3.32”, “@types/chartist”: “0.9.34”, “@types/jasmine”: “2.5.38”, “@types/jquery”: “1.10.31”, “@types/node”: “6.0.73”, “codelyzer”: “2.0.0”, “jasmine-core”: “2.5.2”, “jasmine-spec-reporter”: “3.2.0”, “karma”: “1.4.1”, “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.1.0”, “ts-node”: “2.0.0”, “tslint”: “4.5.0”, “typescript”: “2.4.2” }

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm ERESOLVE error when installing Material UI
Seems like your dependency tree is either broken or the packages you are trying to install have dependencies on their own that are...
Read more >
Cannot install material ui core #35952 - gatsbyjs/gatsby - GitHub
When trying to install @material-ui/core, I'm getting this error: npm WARN config global `--global`, `--local` are deprecated.
Read more >
FAQ/Troubleshooting - Material Theme UI
Here you can find all the Troubleshooting FAQs. Settings. Q: I've installed the Material Theme, but the editor still shows me the Darcula...
Read more >
NPM install error - Material Design for Bootstrap
Trying to install MDB pro 4.19.2 just downloaded and ran npm install but getting this error of sha512 not matching. Can someone tell...
Read more >
module not found: error: can't resolve '@mui/material/button'
Try running npm install --save babel-loader and compile again. If that doesn't work, try reinstalling all dependencies npm ci and compile again. Open...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found