felixmosh / bull-board

🎯 Queue background jobs inspector
MIT License
2.36k stars 366 forks source link

with-hono example doesn't seem to load the dashboard UI (Windows) #775

Closed iceniveth closed 5 months ago

iceniveth commented 5 months ago

Steps to reproduce

  1. Copied the index.js from: hono example
  2. npm install @bull-board/hono @hono/node-server bullmq hono
  3. npm init -y
  4. add scripts: { "start": "node index.js" } in package.json
  5. npm run start

image

Here's the reproduction repo

Environment

felixmosh commented 5 months ago

It works for me :]

image

Check that you are on Node 18 or higher

iceniveth commented 5 months ago

Yes, was on Node 20.9

image

felixmosh commented 5 months ago

Ha, you are on windows, do you get any error in the console?

iceniveth commented 5 months ago

Yes on Windows, This is what it's showing

image

iceniveth commented 5 months ago

I tried it on StackBlits, it does work https://stackblitz.com/~/github.com/iceniveth/bullboard-hono

image

Might be a Windows thing. 😅

felixmosh commented 5 months ago

I think that it is related to differance of paths delimeters between windows and rest of the world.

probably related to this line, https://github.com/felixmosh/bull-board/blob/master/packages/hono/src/HonoAdapter.ts#L176. Will you be able to debug these paths?

iceniveth commented 5 months ago

I tried logging:

console.log(node_path_1.default.join(this.basePath, staticRoute))

Which does return \ui\static

Was able to make it work with

p.replace(node_path_1.default.join(this.basePath, staticRoute).replace(/\\/g, '/'), '')

Though, not sure if there is a better approach.

image

felixmosh commented 5 months ago

Thanx for debugging this Can you test v5.20.3 to check if this solved?

iceniveth commented 5 months ago

Ahm, it still doesn't work. I think it also broke for Linux. 😅

felixmosh commented 5 months ago

try v5.20.4 :]

iceniveth commented 5 months ago

Thanks a lot 🙏, works on both Linux / Windows