Cloudflare pages not compatible with Node.js packages

I am having an error when deploying a SvelteKit app that uses some Node.js packages in the server. I get this error in the logs: The package "path" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error. So, where do I have to use "platform: 'node"" in my project??
3 Replies
Adi//
Adi//14mo ago
is this for pages functions? on the dashboard there is a way to enable node compat if thats what u are lookin for
Javier88889999
Javier88889999OP14mo ago
I don't have any page functions configured. I've tried to add the flag there "platform: 'node'" and It didn't work either.
Isaac McFadyen
Isaac McFadyen14mo ago
SvelteKit uses Pages Functions. You need to enable node compat on the Cloudflare dashboard, Pages doesn't check tsconfig.json
Want results from more Discord servers?
Add your server