I tried every solution in the internet and it fails every time, here is wha i tried: 1-add global window to server.ts 2-domino 3-create service and inject DOCUMENT anything can help would be advantage to me.
ReferenceError: window is not defined
at StorageService.getUser (C:\Users\dell\Desktop\projects\angular\radio_front\dist\radio_front\server\main.js:1:3847800)
at C:\Users\dell\Desktop\projects\angular\radio_front\dist\radio_front\server\main.js:1:3848390
at C:\Users\dell\Desktop\projects\angular\radio_front\dist\radio_front\server\main.js:1:4186790
at Object. (C:\Users\dell\Desktop\projects\angular\radio_front\dist\radio_front\server\main.js:1:4187022)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! radio-front@0.0.0 serve:ssr: node dist/radio_front/server/main.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the radio-front@0.0.0 serve:ssr script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\dell\AppData\Roaming\npm-cache_logs\2022-07-20T10_27_27_429Z-debug.log