ReferenceError: require is not defined
at file:///var/www/frappe-bench/apps/raven/frontend/tailwind.config.js:193:12
at ModuleJobSync.runSync (node:internal/modules/esm/module_job:367:35)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:325:47)
at loadESMFromCJS (node:internal/modules/cjs/loader:1392:24)
at Module._compile (node:internal/modules/cjs/loader:1525:5)
at Object..js (node:internal/modules/cjs/loader:1680:16)
at Module.load (node:internal/modules/cjs/loader:1328:32)
at Function._load (node:internal/modules/cjs/loader:1138:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
Node.js v23.0.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command failed: yarn build
The same error msgs are created for various apps that uses ‘require’ instead of ‘import’, I think.
Have tested with main branch as well as the dev branch, but both are in the same situation. I also tested with lower version Node/npm, but then upgrade it to the latest (v23), but I still have the same error.
This first one, is an issue with Raven not Drive, they’re not the same error/warning.
This second one, you could’ve let this second one finish instead of aborting it. The require() is only a warning not an error. I’ve validated this on node 18, 20, (recommended) and 23 for your instance.
Regarding the main vs develop. I suggest sticking to main, so bench get-app drive --branch main. Avoid using different versions than the recommended ones if you can help it, for database and runtimes especially.