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

Error "The document object is not available" with Angular 19 with SSR and @angular-architects/native-federation 18.2.3 #704

Open
hal1984 opened this issue Dec 3, 2024 · 5 comments

Comments

@hal1984
Copy link

hal1984 commented Dec 3, 2024

Reproduction step:

create new angular project: ng new shell --ssr
add native federation: ng add @angular-architects/native-federation --project shell --type dynamic-host --port 4200
run the project: npm run start

Expected result:

The application launch

Current result:

ng serve fails on open webpage with "The document object is not available"

Stackblitz with error:

https://stackblitz.com/~/github.com/hal1984/shell

@hal1984 hal1984 mentioned this issue Dec 3, 2024
2 tasks
@hal1984
Copy link
Author

hal1984 commented Dec 3, 2024

As further investigation I am pretty sure that the problem was introduced here:

angular/angular#58386

when the check Is isPlatformBrowser was replaced for the global variable ngServerMode.

@manfredsteyer
Copy link
Contributor

Thanks for pointing this out.
This seems to be an issue with provideClientHydration -- if you skip this option in your app.config.ts it works. We will further look into this issue.

@manfredsteyer
Copy link
Contributor

Just published version 18@latest and version 19. It should work now.

@hal1984
Copy link
Author

hal1984 commented Dec 23, 2024

Just published version 18@latest and version 19. It should work now.

Hello, now appears to be problems loading a a remote component into the shell and with the ssr serve:

#718
#719

@manfredsteyer
Copy link
Contributor

Thanks for this info. I'll look into it.

@manfredsteyer manfredsteyer reopened this Dec 29, 2024
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

2 participants