You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was throwing a cryptic error, that this class essentially is not found. Reason for this is that the code is run on the server as well. Solution was to wrap the whole subtree into a client only component so that therefore the code is not executed on the server.
But the main problem for me was that it took me some time to figure out what was the problem.
Wouldn't it be a good idea to improve the error message? That e.g browser api's cannot be used on the server and therefore that the component should be wrapped into a clientOnly component.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello guys,
So, I am working on a small application where I am using the
RTCPeerConnection
class in a signal initialization like the following:This was throwing a cryptic error, that this class essentially is not found. Reason for this is that the code is run on the server as well. Solution was to wrap the whole subtree into a client only component so that therefore the code is not executed on the server.
But the main problem for me was that it took me some time to figure out what was the problem.
Wouldn't it be a good idea to improve the error message? That e.g browser api's cannot be used on the server and therefore that the component should be wrapped into a clientOnly component.
Beta Was this translation helpful? Give feedback.
All reactions