Angular not compiling after update from 11 to 12 version

214 Views Asked by At

I have problems with ngx-localforage library after updating angular from 11 to 12 version.

The result of execute ng serve is the following:

Error: node_modules/ngx-localforage/dist/src/localforage.module.d.ts:5:21 - error TS2694: Namespace '"C:/xampp/htdocs/schoolmanager/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDefWithMeta'.

5     static ɵmod: i0.ɵɵNgModuleDefWithMeta<LocalForageModule, never, never, never>;
                      ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/ngx-localforage/dist/src/localforage.service.d.ts:16:21 - error TS2694: Namespace '"C:/xampp/htdocs/schoolmanager/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.

16     static ɵfac: i0.ɵɵFactoryDef<LocalForageService, never>;
                       ~~~~~~~~~~~~


Error: node_modules/ngx-localforage/dist/src/localforage.service.d.ts:17:22 - error TS2724: '"C:/xampp/htdocs/schoolmanager/node_modules/@angular/core/core"' has no
exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?

17     static ɵprov: i0.ɵɵInjectableDef<LocalForageService>;
                        ~~~~~~~~~~~~~~~
  • I tryed removing node_modules folter and executing npm install, but it doesn't works.
  • Also I tryed executing npm ci, but it continue failing.
  • Also I tryed adding the following in the tsconfig.json file
"paths": {
      "@angular/*": ["./node_modules/@angular/*"]
    },

And ...

"enableIvy": true,
"allowEmptyCodegenFiles": true

But nothing worked ...

Can someone help me please?

Thanks!

0

There are 0 best solutions below