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
517 stars 101 forks source link

Incompatibility with prerender routes #287

Open mojtabanpe opened 9 months ago

mojtabanpe commented 9 months ago

Describe the bug If we use prerender and routesFile in angular.json REQUEST token hasn't provided.

To Reproduce Steps to reproduce the behavior:

  1. Go to angular.json
  2. Setup "prerender": { "discoverRoutes": false, "routesFile": "routes.txt" },
  3. Provide routes.txt beside angular.json
  4. Try to build and See error

An unhandled exception occurred: R3InjectorError(Standalone[o])[o -> o -> InjectionToken REQUEST -> InjectionToken REQUEST]: NullInjectorError: No provider for InjectionToken REQUEST! See "/tmp/ng-SbxhnB/angular-errors.log" for further details.