NodeJS compat not working

Hey there, i've just tried creating a worker and wanted to use the pgclient for connections to hyperdrive, but now I'm getting the error The package "string_decoder" wasn't found on the file system but is built into node. Add "node_compat = true" to your wrangler.toml file to enable Node.js compatibility. which I did, but it still won't work for some reason. What am I doing wrong?
No description
9 Replies
kian
kian14mo ago
Put node_compat above [[kv_namespaces]]
Hello, I’m Allie!
Put node_compat under compatibility_date Oh oop
kian
kian14mo ago
Yeah meowlul
Hello, I’m Allie!
Hai kian
kian
kian14mo ago
Same with minify, it won't be doing anything right now.
Zetax
ZetaxOP14mo ago
Oh, I didnt know it was order sensitive Thank you
Hello, I’m Allie!
Yeah, that's TOML for ya'... 😅
kian
kian14mo ago
TOML tables (square brackets) only end at another table or end of file - so [[hyperdrive]] would inherit those two values.
Zetax
ZetaxOP14mo ago
Ah okay, thanks for the explanation :D
Want results from more Discord servers?
Add your server