0

I am using a library -> "bn-ng-idle": "2.0.1", and other versions are : Angular CLI: 1.7.4 Angular: 5.2.1

While doing -> ng serve getting an error :

bn-ng-idle.mjs:32 Uncaught TypeError: Cannot read properties of undefined (reading 'Injectable')
at eval (bn-ng-idle.mjs:32:162)
at ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs (vendor.bundle.js:1958:1)
at __webpack_require__ (inline.bundle.js:55:30)
at eval (app.module.ts:20:1)
at ./src/app/app.module.ts (main.bundle.js:60:1)
at __webpack_require__ (inline.bundle.js:55:30)
at eval (main.ts:4:1)
at ./src/main.ts (main.bundle.js:1123:1)
at __webpack_require__ (inline.bundle.js:55:30)
at 0 (main.bundle.js:1131:18)

and in the vs code console :

   WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
  32:143-161 "export 'ɵɵFactoryTarget' (imported as 'i0') was not found in 
  '@angular/core'

  WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
  32:23-44 "export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in 
 '@angular/core'

  WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
  33:24-48 "export 'ɵɵngDeclareInjectable' (imported as 'i0') was not found in 
  '@angular/core'

 WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
 34:0-27 "export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in 
 '@angular/core'

 WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
 43:141-159 "export 'ɵɵFactoryTarget' (imported as 'i0') was not found in 
 '@angular/core'

 WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
 43:22-43 "export 'ɵɵngDeclareFactory' (imported as 'i0') was not found in 
 '@angular/core'

 WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
 44:22-44 "export 'ɵɵngDeclareNgModule' (imported as 'i0') was not found in 
 '@angular/core'

 WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
 45:22-44 "export 'ɵɵngDeclareInjector' (imported as 'i0') was not found in 
 '@angular/core'

 WARNING in ./node_modules/bn-ng-idle/fesm2015/bn-ng-idle.mjs
 46:0-27 "export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in 
 '@angular/core'
     

Any one can help me to solve it, please.

Rakesh Saini
  • 660
  • 2
  • 7
  • 20
  • Have you tried to delete your node_modules directorie and the package-lock.json file ? Then, "npm install". Otherwise, try to install an older version of "bn-ng-idle". Or update the project dependencies. – user1075296 Sep 09 '22 at 08:16
  • I tries both but getting same error. – Rakesh Saini Sep 09 '22 at 09:16

0 Answers0