ReferenceError Help in next13

Attached is my error as well as my next.config.js file. I have no idea what this error means and I'm having trouble finding a solution online.
No description
No description
12 Replies
dan
dan14mo ago
You can't mix cjs and mjs, change the module.exports = to export default. module.exports is how you export in cjs format and export default is for mjs.
machina
machina14mo ago
which is typically recommended for a nextjs project? Also thank you for the response
dan
dan14mo ago
mjs
machina
machina14mo ago
ok because my tailwind config and postcss config are all module .exports and now its giving me a hard time for those
machina
machina14mo ago
No description
dan
dan14mo ago
for postcss make it .cjs tailwind you can use .ts or also just change it to .cjs if you change it to ts make sure you use export default
machina
machina14mo ago
ok it says it doesn't like postcss being .cjs. How can I fix this new error while keeping it .cjs
machina
machina14mo ago
No description
machina
machina14mo ago
also should type: module be in my package.json?
machina
machina14mo ago
No description
dan
dan14mo ago
yes
machina
machina14mo ago
ok i renamed the css file to .cjs extension testing... it works! thanks appreciate it
Want results from more Discord servers?
Add your server