Lemmiwinks
Lemmiwinks
NNuxt
Created by Lemmiwinks on 4/13/2024 in #❓・help
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?
2 replies