Open luis-sts opened 4 years ago
In this case, the dist folder will be generated on the build
step, that means you need to serve after build:
npm run build:ssr
Then run:
npm run serve:ssr
Or as shortcut, run npm run start:ssr
.
Understood, I deleted the existing dist folder just in case. I ran the commands and I still get the same error as before. Any thoughts and again thank you for your time.
ReferenceError: window is not defined at _window
Assuming you are using Angular v8, the above error is caused by some dependency relying on the window object, which doesn't exist on server side unless you use something to emulate it. I don't remember using it anywhere so probably need to take a look at it.
Thank you so much i will definitely be looking at that. Your project has been a big help, please let me know if I could donate a cup of coffee or lunch please!
Sorry if this will seem like simple question, you reference your dist folder and files in "package" but i do not see it in your repository. Would you please let me know if it is hidden? Again, i greatly appreciate your time. Having an error with my main.js file with ReferenceError for window