Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular Calendar - Positioning SSR Issue #1177

Closed
pisix opened this issue Feb 15, 2020 · 11 comments
Closed

Angular Calendar - Positioning SSR Issue #1177

pisix opened this issue Feb 15, 2020 · 11 comments

Comments

@pisix
Copy link

pisix commented Feb 15, 2020

Describe the bug

I am trying to run SSR on my project, but I am facing the problem below which is related to the angular-calendar library

)(window, function() {
   ^
ReferenceError: window is not defined
    at Object../node_modules/angular-calendar/node_modules/positioning/dist/umd/positioning.js (main.js:216360:4)
    at __webpack_require__ (main.js:20:30)
    at Module../node_modules/angular-calendar/__ivy_ngcc__/fesm2015/angular-calendar.js (main.js:211113:69)
    at __webpack_require__ (main.js:20:30)
    at Object../src/app/pro/agenda/agenda.component.ts (main.js:472512:28)
    at __webpack_require__ (server/main.js:20:30)
    at Object../src/app/pro/pro.module.ts (main.js:478761:28)
    at __webpack_require__ (main.js:20:30)
    at Object../src/app/app.module.ts (main.js:460489:22)
    at __webpack_require__ (main.js:20:30)

A server error has occurred.

Screenshots

Versions

  • @angular/core: 9.0.0
  • angular-calendar: 0.28.2"
  • Browser name and version: Chrome
@smokinguns
Copy link

looks like past versions have worked with SSR. Hoping this will be resolved.

@pisix
Copy link
Author

pisix commented Feb 26, 2020

which version for example.

@smokinguns
Copy link

#997 is closed, but shows where they got it working

@mattlewis92
Copy link
Owner

Please can you give 0.28.3 a try, this should be fixed now 😄

@smokinguns
Copy link

@mattlewis92 haven't verified, but sent you a thank you via pay pal. Hopefully it's enough for a pint ;)

@smokinguns
Copy link

@mattlewis92 does this require the domino package mentioned in #997 for SSR? Now I'm getting window not defined.

@mattlewis92
Copy link
Owner

@mattlewis92 haven't verified, but sent you a thank you via pay pal. Hopefully it's enough for a pint ;)

Thank you so much! ❤️

@mattlewis92 does this require the domino package mentioned in #997 for SSR? Now I'm getting window not defined.

You might need to patch your webpack server config like this for it to work: #997 (comment)

If that still doesn't work, would you be able to make me a minimal repro on github that shows your issue and I can debug further? Thanks! 😄

@smokinguns
Copy link

@mattlewis92 ok, got it to build. Should it be able to render SSR. Sorry this is my first attempt at SSR. When I put in page, the request never returns. I pushed up sample repo. I appreciate your help.

https://github.com/smokinguns/bug-free-potato

@mattlewis92
Copy link
Owner

mattlewis92 commented Mar 1, 2020

Thanks so much for taking the time to put up a repro, it really helped. The issue was specific to the day and week view which was why it was working for me (I was testing on the month view). I just released 0.28.4 with a fix and it appears to be working nicely on your repo now 😄

@smokinguns
Copy link

works... you saved my timeline... another token coming your way

@mattlewis92
Copy link
Owner

Awesome, that's great to hear, and thank you! I really appreciate it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants