Justix
Justix
NNuxt
Created by Justix on 12/20/2024 in #❓・help
Error when using deployed version of Nuxt module with Sanity depdendencies
I am currently trying to use Sanity dependencies within a Nuxt module. The module works completely fine in the playground, but when deploying to npm, it breaks in my Nuxt 3 App. The server starts up and then throws "Cannot find module './cjs/react.development.js'" once a client connects to the app. I installed the module in the Nuxt app like this:
"devDependencies": {
"@sanity/types": "^3.68.3"
},
"dependencies": {
"@devite/nuxt-sanity": "^2.0.1",
"@nuxt/image": "^1.8.1",
"@sanity/client": "^6.22.5",
"@portabletext/vue": "^1.0.11",
"nuxt": "^3.14.1592",
"vue": "3.5.13",
"vue-router": "^4.5.0"
}
"devDependencies": {
"@sanity/types": "^3.68.3"
},
"dependencies": {
"@devite/nuxt-sanity": "^2.0.1",
"@nuxt/image": "^1.8.1",
"@sanity/client": "^6.22.5",
"@portabletext/vue": "^1.0.11",
"nuxt": "^3.14.1592",
"vue": "3.5.13",
"vue-router": "^4.5.0"
}
7 replies
NNuxt
Created by Justix on 12/10/2024 in #❓・help
Module playground not starting (too many open files)
I am currently writing a Sanity integration for Nuxt.js 3 based on @nuxtjs/sanity by Daniel Roe. Sadly, the dev server (playground) stopped working after updating to the latest Nuxt version. The server crashes with error message EMFILE: too many open files, watch. I tried adding the Sanity Studio directory (cms/**) in Vite's server config, but this couldn't resolve the issue. The only solution I've found is moving the Sanity Studio out of the playground directory. Is there any other way I can ignore the directory from being watched by Vite? Thanks in advance!
14 replies