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

Metadata version mismatch found version 4, expected 3 #19

Open
deQuota opened this issue Dec 7, 2017 · 17 comments
Open

Metadata version mismatch found version 4, expected 3 #19

deQuota opened this issue Dec 7, 2017 · 17 comments

Comments

@deQuota
Copy link

deQuota commented Dec 7, 2017

Metadata version mismatch for module ../ng4-loading-spinner/ng4-loading-spinner.d.ts, found version 4, expected 3,
Getting error above ,
"@angular/core": "^4.4.6",
"ng4-loading-spinner": "^1.1.1",

@alexfeds
Copy link

alexfeds commented Dec 7, 2017

same issue ../ng4-loading-spinner/ng4-loading-spinner.d.ts, found version 4, expected 3,

@burhangul
Copy link

i have same error

@alexfeds
Copy link

alexfeds commented Dec 8, 2017

To get it working in Angular 4, you can use older version of the spinner, in package.json include this version, "ng4-loading-spinner": "1.0.27", run npm i --save. And use this tags <app-spinner> </app-spinner> in root html component

@mallika-chawda
Copy link

The above works when I am just building using ng build but fails when I use ng build --prod. Any fix for the same?

@amitmahida92
Copy link
Owner

amitmahida92 commented Dec 13, 2017

@deQuota , @alexfeds @burhangul @mallika-chawda
Please update your all angular dependencies to 5.x and update your @angular/cli to 1.5.x.
This resolves the issue. I have verified the same.

Thanks.

@kalyank23
Copy link

@amitmahida92 I wrote my project on angular 4 so it will be difficult for me to update to angular 5 as there are lot of other dependeicies, so could you suggest other solutions for this issue.

@alexfeds
Copy link

@kalyank23 I am also doing project in Angular 4, you can still use it by method I have described

@kalyank23
Copy link

kalyank23 commented Dec 21, 2017

@alexfeds Hi, thank you for your response. If I install 1.0.27 then getting the error as in #9 so when I install 1.1.1 version then again the issue is same. Could you share the sample code on how to use with 1.0.27

@alexfeds
Copy link

alexfeds commented Dec 21, 2017

@kalyank23 can you tell me what version of Angular 4 you using? I am not sure but the problem can be that even you install different version its still locked in package-lock.json. So go to package-lock.json and double check that the version is "1.0.27" (make sure there is no ^ symbol, otherwise it will pull other version) and it should be the same in package.json file.

package-lock.json

"ng4-loading-spinner": { "version": "1.0.27", "resolved": "https://registry.npmjs.org/ng4-loading-spinner/-/ng4-loading-spinner-1.0.27.tgz", "integrity": "sha1-7HrRKbXcG1VZY7WvQQc2vISmPs4=", "requires": { "@angular/core": "4.4.6", "rxjs": "5.5.2", "zone.js": "0.8.18" } },

package.json

"ng4-loading-spinner": "1.0.27",

After that run npm -i --save. Hope it helps

@byhoratiss
Copy link

I've also met this problem, and using v1.0.27 works differently, configuration and methods are different, and I cannot update my dependencies to angular 5 so I've to let go this module :(

@kalyank23
Copy link

I made it work in my angular 4 code by downloading the ng4-loading-spinner 1.0.27 in my local machine, and using this code as a one more component for my project. Just download and extract to your project and arrange the import statements in your project then you will get it work.

@lesiba7
Copy link

lesiba7 commented Jan 11, 2018

I use angular 4 and downgrading works,
Downgrade to v1.0.27 as mentioned above and remove the forRoot() on the main module's imports ( from Ng4LoadingSpinnerModule.forRoot() to Ng4LoadingSpinnerModule).

@RkReddy88
Copy link

@lesiba7 I tried the same thing to downgrade the version to v1.0.27 and changes as you mentioned but
still not able to publish the application with the following exception,

image

and this is my package.json
image

@enjniranjan
Copy link

enjniranjan commented Feb 16, 2018

I also had the same issue in my project , I followed these things:

  1. downgraded ng4-loading-spinner to 1.0.27
  2. changed Ng4LoadingSpinnerModule.forRoot() to Ng4LoadingSpinnerModule in app.module.ts.
  3. changed "ng4-loading-spinner" to "app-spinner" in html.

And it worked fine for me.

@suchetaswabhav
Copy link

Hi, even i am facing the same error -

ERROR in Error: Metadata version mismatch for module /home/dell/Downloads/Datshare/Adaani5.0 (another copy).0/node_modules/ng4-loading-spinner/ng4-loading-spinner.d.ts, found version 4, expected 3, resolving symbol MasterSystemModule in /home/dell/Downloads/Datshare/Adaani5.0 (another
.....
....

And i tried @enjniranjan and @lesiba7 and @alexfeds answers ... but none worked for me

@amitmahida92
Copy link
Owner

Hello @suchetaswabhav , Can i have the details of you package.json please?

@jnthnlxmn2
Copy link

@alexfeds thanks! works fine to me

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