-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Next.js & Vercel Support #444
Comments
How Vercel suggest to work with paths? Btw, the code fixes #310 |
I'm pretty sure generally all you need to do is specify the relative paths which should work for everyone, but I could be wrong. @felixmosh whats the best way to test & pull in my forked changes into my repo? |
You can install from github from you branch... |
+1, I'm getting the same error on Vercel:
|
Any suggestions how to fix this? |
@felixmosh @samuelcole I have a fork where I have been testing a potential fix. I'm using AFAIK, I can't simply just point my |
You can point to your fork with a branch, which there will push the dist. |
any update on this? i'm ridiculously running bull-board on my local computer with my production redis url to work around this 😬 |
@samuelcole did you debug the issue? I'm not familiar with Vercel at all... |
i'm not sure how to deploy @caseypugh's branch to vercel my package.json has
can i just point that to casey's github url? |
@samuelcole you can technically do: "@bull-board/express": "caseypugh/bull-board", but it wont work. my dumb hack around this has been to separately deploy a vanilla Bull Dashboard to Heroku (no nextjs). I put a {
...
"build": "yarn queue-build",
"queue-build": "npx tsc --esModuleInterop true --outDir .build/ queues/*.ts",
"dev:worker": "npx nodemon queues/process.ts",
"dev:dashboard": "npx nodemon queues/dashboard.ts",
"dashboard": "node .build/queues/dashboard.js",
"worker": "node .build/queues/process.js",
} @felixmosh There is no easy way (that I know of) for us to point the What if I set up a sample Nextjs project for you and then you could try deploying to Vercel yourself to see the issue directly? It's entirely free. Also, Vercel wont be the only cloud provider that has this issue. The fact you are using full system paths is a code smell since a cloud provider would never give you access to the fullpath due to security concerns. You'd need to use relative paths. |
@caseypugh how can we solve this? make the paths relative? How can I debug this issue myself? |
@felixmosh Easiest thing to do is to sign up for a serverless provider like Vercel and try deploying a sample project yourself. It's 100% free! And yes, like I said before, I'm pretty sure the solution is to just make the paths relative. |
@caseypugh but I don't have a public redis service that I can connect to in order to test it.... |
Can someone try with the mentioned solution here? |
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. |
Keeping it alive: still a problem for me |
The same here, looking forward for a fix |
@Uchihinha try this: #485 (comment) |
@samuelcole it worked now, thank you! |
The issue isn't with vercel's hosting, it's their build step that uses (or operates similarly to) @vercel/ncc. The files don't exist because they aren't referenced, and are stripped from the production build. I'm using ncc for an express deployment, and encountered the same error message. |
For those like me struggling to make it work, I got it working now, thanks to #485 (comment) + #485 (comment) 🎉 this is my full {
"version": 2,
"rewrites": [
{
"source": "/admin/queues",
"destination": "api/server.js"
},
{
"source": "/admin/queues/(.*)",
"destination": "api/server.js"
}
],
"functions": {
"api/server.js": {
"includeFiles": "node_modules/@bull-board/ui/**"
}
}
} and this is my createBullBoard({
queues,
serverAdapter: serverAdapter,
options: { uiBasePath: `${process.cwd()}/node_modules/@bull-board/ui` },
}); |
This issue also affects esbuild bundling. I'm trying it for fastify, but it's not working. |
There's an ongoing thread #124 here about how to integrate
bull-board/express
with Nextjs. The latest solution works great, however, if you are deploying to Vercel you run into issues trying to access@bull-board/ui/package.json
.Here's the main issue, I believe
Vercel is not going to give access to the full path of their server... so pretty sure relative paths need to be used instead. Something like...
Also, it'd be great to see official Nextjs support in the documentation.
The text was updated successfully, but these errors were encountered: