#Sanity Next js blog error: Attempted import error: './index.cjs'

1 messages · Page 1 of 1 (latest)

sudden vigil
#

So i'm getting this error on my sanity, Next 13 blog project but it deployes successfully.
It says "./node_modules/next-sanity/dist/studio/index.cjs.js
Attempted import error: './index.cjs' does not contain a default export (imported as 'cjs')."

I've looked everywhere couldn't find the answer.

Thanks

hardy tusk
#

Does this project have sanity studio embedded in a Nextjs project?

sudden vigil
#

yeah

hardy tusk
#

Have you double checked your version of node locally vs the version that is run when its deployed?

sudden vigil
#

It's the same version node 18x. on both servers.
I'm also getting this same warning on the local env too. But it runs the build command successfully and everything works fine.