ngx-spinner
ngx-spinner copied to clipboard
Error while adding with ng add in Angular v 13.2.0
Error while adding with: ng add ngx-spinner
I am using it in Angular 13.2.0 Getting following error:
Error: An unhandled exception occurred: Collection "/Users/rajendrakhope/Documents/Dev/Angular/lib-upgrade/iag-base-ui/node_modules/ngx-spinner/schematics/collection.json" cannot be resolved.
Related with #125
Can confirm, I'm also getting this error in Angular 14.0.2
I'm facing same error, Cannot find module 'ngx-spinner' or its corresponding type declarations. in Angular 13.3.11
Facing the same issue, do not see schematics under ngx-spinner module and get the same error. Can we get some help with this? Angular version - 14.1.2
$ ng add ngx-spinner Skipping installation: Package already installed Collection "node_modules\ngx-spinner\schematics\collection.json" cannot be resolved.
$ ng add ngx-spinner Skipping installation: Package already installed Collection "node_modules\ngx-spinner\schematics\collection.json" cannot be resolved.
I have resolved the issue by copying all the css files from node_modules/ngx-spinner/animations and placing them in my assets directory. Afterward, imported the relevant stylesheet in style.css as follows:
@import ‘src/assets/<spinner.css>
Update the import statement by giving the correct filename.
No problem with Angular@~13 with yarn add ngx-spinner@~13
Handco
I uninstalled spinner with
npm uninstall ngx-spinner
and reinstalled with
npm install ngx-spinner --force
Now that's work well.
This works for me, hope this works for you as well.
Same issue is in the angular 16 as well.