ngx-ui icon indicating copy to clipboard operation
ngx-ui copied to clipboard

ng 16 error when using ssr

Open eric-gitta-moore opened this issue 1 year ago • 0 comments

Since codemirror is directly introduced in the code, navigator is called indirectly, causing an error.

/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:58607
  var userAgent = navigator.userAgent;
                  ^

ReferenceError: navigator is not defined
    at /home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:58607:19
    at /home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:58601:28
    at Object.18394 (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:58603:2)
    at __webpack_require__ (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:293642:42)
    at Module.86629 (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:27671:68)
    at __webpack_require__ (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:293642:42)
    at Module.55041 (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:18776:74)
    at __webpack_require__ (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:293642:42)
    at Module.36747 (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:22190:72)
    at __webpack_require__ (/home/win/workspace/fleet/ngx-charts/dist/ngx-charts/server/main.js:293642:42)

A server error has occurred.

eric-gitta-moore avatar Dec 12 '23 03:12 eric-gitta-moore