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
dan15mo 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.
Ryan
RyanOP15mo ago
which is typically recommended for a nextjs project? Also thank you for the response
dan
dan15mo ago
mjs
Ryan
RyanOP15mo ago
ok because my tailwind config and postcss config are all module .exports and now its giving me a hard time for those
Ryan
RyanOP15mo ago
No description
dan
dan15mo 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
Ryan
RyanOP15mo ago
ok it says it doesn't like postcss being .cjs. How can I fix this new error while keeping it .cjs
Ryan
RyanOP15mo ago
No description
Ryan
RyanOP15mo ago
also should type: module be in my package.json?
Ryan
RyanOP15mo ago
No description
dan
dan15mo ago
yes
Ryan
RyanOP15mo 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