N
Nuxt8mo ago
Lemmiwinks

Providing module from node_modules to backend on Vercel

Hi all, Trying to setup bull-board with Nuxt 3 -> https://github.com/felixmosh/bull-board/pull/669 I am getting an error on Vercel when trying to access the route
500

ENOENT: no such file or directory, open '/var/task/node_modules/@bull-board/ui/dist/index.ejs'
500

ENOENT: no such file or directory, open '/var/task/node_modules/@bull-board/ui/dist/index.ejs'
Searching on the errors I came across this comment -> https://github.com/felixmosh/bull-board/issues/444#issuecomment-1944329328 The comment says to provide the module to the sevrer via the vercel.json file
{
"version": 2,
"functions": {
"api/server.js": {
"includeFiles": "node_modules/@bull-board/ui/**"
}
}
}
{
"version": 2,
"functions": {
"api/server.js": {
"includeFiles": "node_modules/@bull-board/ui/**"
}
}
}
The docs say Nuxt 3 compresses all server endpoints and routes into one serverless function -> https://vercel.com/docs/frameworks/nuxt#serverless-functions So Is there a way I can includeFiles for my api endpoints, or server routes?
1 Reply
Lemmiwinks
LemmiwinksOP8mo ago
Based on this issue -> https://github.com/orgs/vercel/discussions/4804 Looks like the nuxt (nitro) config needs to be used here? But I dont see support for "includeFiles" idk if an issue against the nitro repo for that is the way to go?
Want results from more Discord servers?
Add your server