ngx-device-detector: export 'x' was not found in @angular/core

Hi,

I started getting this warnings today after I updated the package to version 1.3.7

WARNING in ./node_modules/ngx-device-detector/fesm5/ngx-device-detector.js 693:63-81 "export 'ɵɵdefineInjectable' was not found in '@angular/core'

WARNING in ./node_modules/ngx-device-detector/fesm5/ngx-device-detector.js 693:169-177 "export 'ɵɵinject' was not found in '@angular/core'

and then this error

core.js:15724 ERROR TypeError: Object(...) is not a function

My @angular/core version is 7.2.12.

Can you please help?

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 19 (5 by maintainers)

Most upvoted comments

I am again facing this issue with “ngx-device-detector”: “^1.4.2”, package.json file looks something like below :

image

@biswas123 v2.0.0 is not for Angular v7 apps. Please downgrade to 1.3.9

I am using version 2.0.0 and am getting the same error now. Could somebody point me to the right solution? Uncaught TypeError: Object(…) is not a function at Module…/node_modules/ngx-device-detector/fesm2015/ngx-device-detector.js (ngx-device-detector.js:750)

Installing the library by this way npm i ngx-device-detector@~1.3.9 (~ required) is working correctly on angular 7