-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bull-board not working with AWS serveless #485
Comments
Hi @GBShadow I think that if you will ask in English, it will approach more ppl. Anyway, I've translated your message, and looks like you have an issue with Nest & aws serverless, I'm not familiar with this setup, so If someone knows it, I will be more that happy for the help. |
This is a duplicate of #444, in my opinion. bull-board does not work in serverless environments because it uses full paths to load some files. |
In serverless env the path to static assets of the ui is not calculated properly, const uiBasePath = YOUR_CORRECT_VALUE
serverAdapter
.setViewsPath(path.join(uiBasePath, 'dist'))
.setStaticPath('/static', path.join(uiBasePath, 'dist/static')); after you pass it to Can you try this and let me know if it helped you? |
same error, i believe it's throwing on this line: bull-board/packages/api/src/index.ts Line 18 in 06a1c98
which is executed when running if we could pass a |
Probably... But i think that serverless is not a good fit anyway, since the board polling its api, you will connect to redis for each request (since serverless env is stateless) |
same error as before: #444 (comment) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@samuelcole, Can you try createBullBoard({
queues: [new BullMQAdapter(exampleBullMq)],
serverAdapter,
options: { uiBasePath: 'YOUR_PATH_TO_@bull-board/ui' } // <---
}); |
I attempted this earlier today, but I couldn't get it working quickly because Vercel needs to be told which static files are required for the serverless bundle when it's not obvious from the imports (which it wouldn't be here...) I know you can manually tell Vercel to include specific files, so I have hope that will work, but I got distracted by other priorities. |
@samuelcole this doesn't seem to work because node_modules isn't included into the resulting Vercel build source. I also tried vercel/vercel#4624
or worse: tried to brute-force include the
Let me know if you had any success. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
For anyone using Nuxt 3, and Vercel who winds up here... Here's how I got around the issue. In your {
"buildCommand": "nuxt build && cp -R ./node_modules/@bull-board/ui .vercel/output/functions/__nitro.func/node_modules/@bull-board/ui"
} Then in your bull-board config options: { uiBasePath: `${process.cwd()}/node_modules/@bull-board/ui`, }, I tried for a while to use the includeFiles option in my vercel config, but Nuxt bundles everything into |
I have a problem with the bull-board, I created my bull-board application with nest and using AWS Lambda, it works normally, but the bull-board does not, when I access the route only the text "Loading..." appears, but If I start without serverless, the bull-board works normally, does anyone have any idea what it could be?
The text was updated successfully, but these errors were encountered: