Hi
I'm using Metronic 9 on a Laravel 11 project through Herd.
Update to node 22.12.0 introduced this error
file:///Users/xxx/Desktop/xxx/Echo/tailwind.config.js:1
const defaultTheme = require('tailwindcss/defaultTheme');
^
ReferenceError: require is not defined
at file:///Users/xxx/Desktop/xxx/Echo/tailwind.config.js:1:22
at ModuleJobSync.runSync (node:internal/modules/esm/module_job:395:35)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:329:47)
at loadESMFromCJS (node:internal/modules/cjs/loader:1414:24)
at Module._compile (node:internal/modules/cjs/loader:1547:5)
at Object..js (node:internal/modules/cjs/loader:1677:16)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
Encouraging open-mindedness and sharing knowledge is important, and I'm here to assist with any questions or topics you'd like to explore further. eggy car
Hi,
Is it possible for you to use Node.js v20 for now? We have not fully migrated to support Node.js v22 yet.
You can try to update your tailwind.config.js file to use import instead of require:
<pre>
import defaultTheme from 'tailwindcss/defaultTheme';
<pre>
Thanks