Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mimsatch version, found version 4 , expected 3. #34

Open
KLTR opened this issue Nov 30, 2017 · 14 comments
Open

Mimsatch version, found version 4 , expected 3. #34

KLTR opened this issue Nov 30, 2017 · 14 comments

Comments

@KLTR
Copy link

KLTR commented Nov 30, 2017

everything was working fine and suddenly just stopped working . didn't change anything related to versions but still get this error. i tried changing to a different version of flash-messages but did not work.

ERROR in Error: Metadata version mismatch for module C:/Users/admin/Desktop/WebDev/MeanAuth/client/node_modules/angular2-flash-messages/module/index.d.ts, found version 4, expected 3, resolving symbol AppModule in C:/Users/admin/Desktop/WebDev/MeanAuth/client/src/app/app.module.ts, resolving symbol AppModule in C:/Users/admin/Desktop/WebDev/MeanAuth/client/src/app/app.module.ts, resolving symbol AppModule in C:/Users/admin/Desktop/WebDev/MeanAuth/client/src/app/app.module.ts
    at Error (native)
    at syntaxError (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:1729:34)
    at simplifyInContext (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24979:23)
    at StaticReflector.simplify (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24991:13)
    at StaticReflector.annotations (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler\bundles\compiler.umd.js:24418:41)
    at _getNgModuleMetadata (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_impl.js:109:26)
    at Object.listLazyRoutesOfModule (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@angular\compiler-cli\src\ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@ngtools\webpack\src\plugin.js:207:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (C:\Users\admin\Desktop\WebDev\MeanAuth\client\node_modules\@ngtools\webpack\src\plugin.js:443:24)
    at process._tickCallback (internal/process/next_tick.js:109:7)

here is my package.json :

{
  "name": "client",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.2.4",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "angular2-flash-messages": "^2.0.4",
    "core-js": "^2.4.1",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.4.4",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.2.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.3.3"
  }
}

@jacksylvane
Copy link

Same problem here.

@taweechok-li
Copy link

I fixed it by change version number from 3 to 4 in
./node_modules/angular2-flash-messages/module/index.js.map file.

@muskanstha
Copy link

muskanstha commented Dec 2, 2017

@Nearkung Didn't work for me.

EDIT: Updated package.json to Angular 5 and running npm install fixed the problem

 {
  "name": "angular-src",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^5.0.0",
    "@angular/common": "^5.0.0",
    "@angular/compiler": "^5.0.0",
    "@angular/core": "^5.0.0",
    "@angular/forms": "^5.0.0",
    "@angular/http": "^5.0.0",
    "@angular/platform-browser": "^5.0.0",
    "@angular/platform-browser-dynamic": "^5.0.0",
    "@angular/router": "^5.0.0",
    "angular2-flash-messages": "^2.0.4",
    "angular2-jwt": "^0.2.3",
    "core-js": "^2.4.1",
    "rxjs": "^5.5.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.5.5",
    "@angular/compiler-cli": "^5.0.0",
    "@angular/language-service": "^5.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "^4.0.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.7.0",
    "typescript": "~2.4.2"
  }
}

@nemanjawork
Copy link

nemanjawork commented Dec 6, 2017

@Nearkung's solution didn't work for me as well.

If for any reason you can't upgrade to angular 5.x as @muskanstha suggests, installing version 1.0.8 of the angular2-flash-messages will work. The only difference will be foregoing the forRoot() part when importing the module.

@kennethsilvere
Copy link

@muskanstha 's solution worked for me.

@cbstodd
Copy link

cbstodd commented Dec 12, 2017

I'm getting a warning with "@angular/core": "^5.1.0",

npm WARN [email protected] requires a peer of @angular/core@~5.0.0 but none is installed. You must install peer dependencies yourself.

npm WARN [email protected] requires a peer of @angular/compiler@~5.0.0 but none is installed. You must install peer dependencies yourself.

@Priiyam
Copy link

Priiyam commented Dec 23, 2017

@nemanjawork solution worked! Thank you!

@moff
Copy link
Owner

moff commented Dec 26, 2017

@Priiyam @cbstodd @nemanjawork @kennethsilvere @muskanstha @jacksylvane @KLTR I've just updated package so it should be fixed by now. Sorry for the delay - I don't have much time to maintain my repos these days! Let me know, if it works. Thanks to all for the feedback!

@RichardZhu123
Copy link

Still have this issue

@Harshad-Akhani
Copy link

Same still issue

@blake-edwards
Copy link

@nemanjawork this solution worked perfectly for me. Not sure about the forRoot() though. Worked fine for me without it!

@correa0inaiara
Copy link

@Nearkung Thankx! It worked with me by changed all 4 version numbers by 3 in all files inside ./angular-src/node_modules/angular2-flash-messages folder.

@jeremydvera
Copy link

inside node_modules\angular2-flash-messages
changed all 4.0.0 to 3.0.0 like this:
perfectly worked for me
"devDependencies": {
"@angular/common": "^3.0.0",
"@angular/compiler": "^3.0.0",
"@angular/compiler-cli": "^3.0.0",
"@angular/core": "^3.0.0",
"@angular/forms": "^3.0.0",
"@angular/http": "^3.0.0",
"@angular/platform-browser": "^3.0.0",
"@angular/platform-browser-dynamic": "^3.0.0",
"@angular/platform-server": "^3.0.0",
"@angular/router": "^3.0.0",
"@angular/upgrade": "^3.0.0",
"@types/core-js": "^0.9.35",
"@types/jasmine": "^2.5.41",
"@types/node": "^7.0.0",
"angular-in-memory-web-api": "~0.2.4",
"bootstrap": "^3.3.6",
"concurrently": "^3.1.0",
"core-js": "^2.4.1",
"lite-server": "^2.2.2",
"reflect-metadata": "^0.1.10",
"rxjs": "5.2.0",
"systemjs": "0.19.47",
"typescript": "^2.2.1",
"zone.js": "^0.8.5"
},

@HenryITS
Copy link

@jeremydvera:
I have changed version 4 to version3 but I still get the same error:
node_modules/angular2-flash-messages/module/index.d.ts, found version 4, expected 3,
I also get an error in bundleDependencies:
"bundleDependencies": false, => Incorrect type. Expected "array".
"deprecated": false,
"description": "Angular 2 flash messages module",
"devDependencies": {

Any idea how to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests