Open deQuota opened 6 years ago
same issue ../ng4-loading-spinner/ng4-loading-spinner.d.ts, found version 4, expected 3,
i have same error
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
The above works when I am just building using ng build but fails when I use ng build --prod. Any fix for the same?
@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 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 I am also doing project in Angular 4, you can still use it by method I have described
@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 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
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 :(
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.
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 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,
and this is my package.json
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.
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
Hello @suchetaswabhav , Can i have the details of you package.json please?
@alexfeds thanks! works fine to me
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",