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
troika seems to break SSR #46
Comments
Thanks for the report. Am I correct in assuming that an SSR environment would not actually attempt to render the text? The suggested fix above would prevent an error on initial script module load, but would fail later on when it actually tried to use that |
… present This makes the link element creation lazy, and falls back to a no-op when there is no browser DOM available, e.g. in React server-side rendering, so that just loading the script does not throw an error.
1b005ec should do the trick, but I'd feel better with some verification before I publish a 0.26.0 release. |
Yes that's correct, it just wouldn't crash. The client on the other hand has the chance to present a view immediately and it's rehydrated later on. I'll ask them to try it out, thanks for the fix ... |
I've gone ahead and published 0.26.0 with that fix, I'm fairly confident that should fix the issue after testing it by |
thats awesome! thanks a lot, i'll re-publish my stuff as well. |
Probably related, I am using nextjs and the following error occurs on startup. on v0.26
|
@gtolarc That should just be a |
yep, I haven't felt any other problems. and in 0.26.1, the warning message disappeared. Thank you! @lojjic |
Sorry, to open this up again. I still see the console.warning in my jest tests. Anyway to suppress this? |
I opened a tiny MR that checks if the process env is 'test' before console logging a failure in creating the web worker in troika-worker-utils: #85 |
pmndrs/drei#25
pmndrs/drei#23
it seems to rely on
document
, which does not exist in node.i believe in order to make troika pseudo-isomorphic all it would have to do is:
this would allow ssr to function normally.
The text was updated successfully, but these errors were encountered: