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