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
I'm working on a Remix app, and trying to add logging using the @logtail/js package as we need to log from the server actions in Node, and directly from the browser.
The server aspect is working perfectly, but as soon as I try to add client-side logging I get the following error in the console:
Remix has a convention of adding a .server.ts suffix to files which should only be included in the server bundles, which is what I've done when using import { Node as Logtail } from '@logtail/js' so I don't believe there is any server specific logic leaking into the client bundle.
The error only appears when I include a React context provider which I've setup for sharing the logger instance to any of my React components in the UI:
I don't see an obvious issue in your logger code. But the error does look like some server code is leaking into the bundle.
Could you please double-check?
Could you also share a more complete example? 🙏
It would help us reproduce the issue on our side.
Hey,
I'm working on a Remix app, and trying to add logging using the
@logtail/js
package as we need to log from the server actions in Node, and directly from the browser.The server aspect is working perfectly, but as soon as I try to add client-side logging I get the following error in the console:
Remix has a convention of adding a
.server.ts
suffix to files which should only be included in the server bundles, which is what I've done when usingimport { Node as Logtail } from '@logtail/js'
so I don't believe there is any server specific logic leaking into the client bundle.The error only appears when I include a React context provider which I've setup for sharing the logger instance to any of my React components in the UI:
Any ideas what's happening? We're on v0.3.1 if it helps!
Thanks in advance
The text was updated successfully, but these errors were encountered: