ng4-loading-spinner icon indicating copy to clipboard operation
ng4-loading-spinner copied to clipboard

Metadata version mismatch found version 4, expected 3

Open deQuota opened this issue 7 years ago • 17 comments

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",

deQuota avatar Dec 07 '17 13:12 deQuota

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

alexfeds avatar Dec 07 '17 20:12 alexfeds

i have same error

burhangul avatar Dec 08 '17 08:12 burhangul

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

alexfeds avatar Dec 08 '17 11:12 alexfeds

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

mallika-chawda avatar Dec 13 '17 11:12 mallika-chawda

@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.

amitmahida92 avatar Dec 13 '17 11:12 amitmahida92

@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.

kalyank23 avatar Dec 21 '17 08:12 kalyank23

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

alexfeds avatar Dec 21 '17 08:12 alexfeds

@alexfeds Hi, thank you for your response. If I install 1.0.27 then getting the error as in https://github.com/amitmahida92/ng4-loading-spinner/issues/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

kalyank23 avatar Dec 21 '17 15:12 kalyank23

@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

alexfeds avatar Dec 21 '17 16:12 alexfeds

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 :(

byhoratiss avatar Jan 08 '18 13:01 byhoratiss

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.

kalyank23 avatar Jan 08 '18 15:01 kalyank23

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).

lesiba7 avatar Jan 11 '18 09:01 lesiba7

@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

RkReddy88 avatar Jan 28 '18 05:01 RkReddy88

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.

enjniranjan avatar Feb 16 '18 10:02 enjniranjan

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

suchetaswabhav avatar May 05 '18 12:05 suchetaswabhav

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

amitmahida92 avatar Jul 18 '18 11:07 amitmahida92

@alexfeds thanks! works fine to me

jnthnlxmn2 avatar Sep 03 '18 01:09 jnthnlxmn2