AhsanAyaz / ngx-device-detector

An Angular v7+ library to detect the device, OS, and browser details.
https://ahsanayaz.github.io/ngx-device-detector
MIT License
520 stars 101 forks source link

Breaking our build on Angular 11 #234

Closed babarinde closed 2 years ago

babarinde commented 2 years ago

Describe the bug When we try to build our app it fails

To Reproduce Steps to reproduce the behavior:

  1. running npm run build
  2. we get this error

Expected behavior A Failed build but strangely, the build works on my local machine "ngx-device-detector": "^2.1.1",

csphmayy commented 2 years ago

Also getting the same error with "ngx-device-detector": "^2.0.6"

tructuthien commented 2 years ago

same issue with new version 2.2.0, It still working with version 2.1.1: "ngx-device-detector": "~2.1.1",

csphmayy commented 2 years ago

@tructuthien Thanks! Version 2.1.1 is also working for me :-)

Adam-Langley commented 2 years ago

+1

2.2.0 is broken 2.1.1 is fine

More specific error here:

2021-11-29T03:22:42.7511124Z ERROR in ./node_modules/ngx-device-detector/fesm2015/ngx-device-detector.mjs 812:30-36
2021-11-29T03:22:42.7511757Z Can't import the named export 'Inject' from non EcmaScript module (only default export is available)
2021-11-29T03:22:42.7512336Z     at HarmonyImportSpecifierDependency._getErrors (/home/vsts/work/1/s/angular/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:88:6)
2021-11-29T03:22:42.7512984Z     at HarmonyImportSpecifierDependency.getErrors (/home/vsts/work/1/s/angular/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:68:16)
2021-11-29T03:22:42.7513601Z     at Compilation.reportDependencyErrorsAndWarnings (/home/vsts/work/1/s/angular/node_modules/webpack/lib/Compilation.js:1463:22)
2021-11-29T03:22:42.7514085Z     at /home/vsts/work/1/s/angular/node_modules/webpack/lib/Compilation.js:1258:10
2021-11-29T03:22:42.7514630Z     at AsyncSeriesHook.eval [as callAsync] (eval at create (/home/vsts/work/1/s/angular/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:40:1)
2021-11-29T03:22:42.7515232Z     at AsyncSeriesHook.lazyCompileHook (/home/vsts/work/1/s/angular/node_modules/tapable/lib/Hook.js:154:20)
2021-11-29T03:22:42.7515725Z     at Compilation.finish (/home/vsts/work/1/s/angular/node_modules/webpack/lib/Compilation.js:1253:28)
2021-11-29T03:22:42.7516164Z     at /home/vsts/work/1/s/angular/node_modules/webpack/lib/Compiler.js:672:17
2021-11-29T03:22:42.7516656Z     at _done (eval at create (/home/vsts/work/1/s/angular/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
2021-11-29T03:22:42.7517388Z     at eval (eval at create (/home/vsts/work/1/s/angular/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:34:22)
2021-11-29T03:22:42.7517882Z     at /home/vsts/work/1/s/angular/node_modules/webpack/lib/Compilation.js:1185:12
2021-11-29T03:22:42.7518313Z     at /home/vsts/work/1/s/angular/node_modules/webpack/lib/Compilation.js:1097:9
2021-11-29T03:22:42.7518717Z     at processTicksAndRejections (internal/process/task_queues.js:79:11)
2021-11-29T03:22:42.7519255Z  @ ./src/app/shared/layout/nav/app-navigation.service.ts
2021-11-29T03:22:42.7519713Z  @ ./src/app/shared/common/app-common.module.ts
2021-11-29T03:22:42.7520003Z  @ ./src/app/app.module.ts
2021-11-29T03:22:42.7520238Z  @ ./src/root.module.ts
2021-11-29T03:22:42.7520462Z  @ ./src/main.ts
2021-11-29T03:22:42.7520697Z  @ multi ./src/main.ts
cufarvid commented 2 years ago

Same issue with version 2.2.0 and Angular 10.

AhsanAyaz commented 2 years ago

Fixed with a new release 2.2.1 Try the update and let me know if then issue is resolved 🙂

cufarvid commented 2 years ago

Fixed with a new release 2.2.1 Try the update and let me know if then issue is resolved 🙂

Works for me. Thanks for the update.

babarinde commented 2 years ago

Fixed with a new release 2.2.1 Resolves the issue. Thanks for the Good work