AdonisJS `node:module` Error on Build

I have my environment variable set: NODE_VERSION 18.17.1 Yet when I build I get the following error, is this incompatible with Workers?
SyntaxError: The requested module 'node:module' does not provide an export named 'register'
SyntaxError: The requested module 'node:module' does not provide an export named 'register'
8 Replies
kian
kian•11mo ago
Workers aren't NodeJS and only have a limited subset of Node modules (https://developers.cloudflare.com/workers/runtime-apis/nodejs/) available for compatibility.
jjjrmy
jjjrmyOP•11mo ago
oh okay, so I'm sh*t out of luck I guess 😆 so curious, what is the difference between node compat versions if only a subset is available?
Erisa
Erisa•11mo ago
NODE_VERSION is used in the Pages build environment for building projects from source, it has no bearing on Workers or Pages Functions at runtime
jjjrmy
jjjrmyOP•11mo ago
well I got that error on build of my pages app but I think no matter what, not all of Node is supported
Erisa
Erisa•11mo ago
At which stage? Its probably the bundler complaining that youre trying to add node modules that wont work at runtime
jjjrmy
jjjrmyOP•11mo ago
on npm run build
Erisa
Erisa•11mo ago
And does the same happen when running that locally? (by the way as a sidenote since this is Pages you're in the wrong channel there's #pages-help)
jjjrmy
jjjrmyOP•11mo ago
oh ... maybe it's an issue locally too 😆 okay let me work on this a bit more thanks
Want results from more Discord servers?
Add your server