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

el.getRootNode is not a function error when building with Angular 17 SSR #7550

Closed
1 task done
stehag opened this issue Dec 10, 2023 · 7 comments
Closed
1 task done

Comments

@stehag
Copy link

stehag commented Dec 10, 2023

Reduced Test Case

https://github.com/stehag/fullcalendar-a17-ssr-bug

Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?

  • I understand

Which connector are you using (React/Angular/etc)?

Angular

Bug Description

Fullcalendar with angular 17 SSR yields this error:

ERROR TypeError: el.getRootNode is not a function
at ensureElHasStyles (/Users/hag/angular/a17-fullcalendar/node_modules/@fullcalendar/core/internal-common.js:15:31)
at Calendar (/Users/hag/angular/a17-fullcalendar/node_modules/@fullcalendar/core/index.js:2033:9)
at FullCalendarComponent.ngAfterViewInit (/Users/hag/angular/a17-fullcalendar/node_modules/@fullcalendar/angular/fesm2020/fullcalendar-angular.mjs:407:38)
at callHookInternal (/Users/hag/angular/a17-fullcalendar/node_modules/@angular/core/fesm2022/core.mjs:3523:14)
at callHook (/Users/hag/angular/a17-fullcalendar/node_modules/@angular/core/fesm2022/core.mjs:3550:13)
at callHooks (/Users/hag/angular/a17-fullcalendar/node_modules/@angular/core/fesm2022/core.mjs:3505:17)
at executeInitAndCheckHooks (/Users/hag/angular/a17-fullcalendar/node_modules/@angular/core/fesm2022/core.mjs:3455:9)
at refreshView (/Users/hag/angular/a17-fullcalendar/node_modules/@angular/core/fesm2022/core.mjs:13461:21)
at detectChangesInView (/Users/hag/angular/a17-fullcalendar/node_modules/@angular/core/fesm2022/core.mjs:13615:9)
at detectChangesInViewIfAttached (/Users/hag/angular/a17-fullcalendar/node_modules/@angular/core/fesm2022/core.mjs:13578:5)

To recreate from reduced test-case, clone repo, npm install, ng serve, access http://localhost:4200, check the terminal console.

@acerix acerix changed the title ensureElHasStyles: el.getRootNode is not a function using angular 17 el.getRootNode is not a function in pre-render building with Angular 17 SSR Dec 15, 2023
@acerix acerix changed the title el.getRootNode is not a function in pre-render building with Angular 17 SSR el.getRootNode is not a function error when building with Angular 17 SSR Dec 15, 2023
@nuhrecep
Copy link

Do you have any information about the cause of this error?

@lbattaglioli2000
Copy link

I'm getting the same issue too. Using NPM install, and instantiating the calendar via Alpine JS. Calendar won't render.

@stehag
Copy link
Author

stehag commented Jan 26, 2024

Unfortunatley this occurs in preact as well, so i'll guess it will take some time to get support for Angular 17 ssr :(

@aravindh-imagine
Copy link

I'm getting the same issue but I have check isPlatformBrower.Then I don't have see this issue.
image
image

@arshaw
Copy link
Member

arshaw commented Feb 6, 2024

There's a workaround I'll try to release today or tomorrow. Apologies for the troubles.

@arshaw arshaw modified the milestones: next-release, next-release-temp Feb 6, 2024
@arshaw
Copy link
Member

arshaw commented Feb 20, 2024

I've released a fix in v6.1.11

Could someone please verify?

@arshaw arshaw closed this as completed Feb 20, 2024
@stehag
Copy link
Author

stehag commented Mar 16, 2024

Works like a charm! Sorry about the late reply, missed that a fixed had been released! Awesome man!

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

No branches or pull requests

6 participants