shay
shay
Explore posts from servers
CDCloudflare Developers
Created by shay on 7/8/2024 in #workers-help
Unable to bind durable objects on Remix + Vite project
No, I ended up shelving this and staying on the classic app server :( sorry
3 replies
CDCloudflare Developers
Created by shay on 2/8/2024 in #workers-help
Failed module resolutions using `pg` and Drizzle
Resolved the issue by switching to postgres over pg. It's relatively drop-in since I'm using drizzle. Just hoping it'll work properly outside of the local environment - I was using pg because the drizzle documentation uses it in the Workers example.
3 replies
CDCloudflare Developers
Created by shay on 2/8/2024 in #workers-help
Failed module resolutions using `pg` and Drizzle
I've managed to get the server to start successfully (with a warning about duplicate object keys being generated in the build, for some reason) by polyfilling the missing modules in remix.config.js:
serverNodeBuiltinsPolyfill: {
modules: {
fs: true,
events: true,
assert: true,
dns: true,
net: true,
crypto: true,
tls: true,
path: true,
stream: true,
},
globals: {
process: true,
},
},
serverNodeBuiltinsPolyfill: {
modules: {
fs: true,
events: true,
assert: true,
dns: true,
net: true,
crypto: true,
tls: true,
path: true,
stream: true,
},
globals: {
process: true,
},
},
and by enabling node_compat in wrangler.toml. So while this does allow the server to start, once the Pool is actually created, I receive the following: ✘ [ERROR] Error: Node.js net module is not supported by JSPM core outside of Node.js What can I do about this? I assume this is because of my polyfilling, can I do this without polyfilling?
3 replies