‘require is not defined’ error when I try to run bundle.mjs created by webpack
I develop an app with node.js Fastify framework (typescript, ES syntax). I use Webpack to bundle the app and to compile typescript. The app bundles successfully, but when I try to run the resulting bundle.cjs file, I get the following error: