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?
8 Replies
Workers aren't NodeJS and only have a limited subset of Node modules (https://developers.cloudflare.com/workers/runtime-apis/nodejs/) available for compatibility.
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?
NODE_VERSION
is used in the Pages build environment for building projects from source, it has no bearing on Workers or Pages Functions at runtimewell I got that error on build of my pages app
but I think no matter what, not all of Node is supported
At which stage? Its probably the bundler complaining that youre trying to add node modules that wont work at runtime
on
npm run build
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)
oh ... maybe it's an issue locally too 😆
okay let me work on this a bit more
thanks