Skip to content
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

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

Closed
iceniveth opened this issue Jun 24, 2024 · 11 comments · May be fixed by https-quantumblockchainai-atlassian-net/ossinsight#887

Comments

@iceniveth
Copy link

iceniveth commented Jun 24, 2024

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

  • Windows 11 (23H2)
  • Node 20.9.0
  • Deps:
    "dependencies": {
      "@bull-board/hono": "^5.20.2",
      "@hono/node-server": "^1.11.4",
      "bullmq": "^5.8.2",
      "hono": "^4.4.7"
    }
    
@felixmosh
Copy link
Owner

It works for me :]

image

Check that you are on Node 18 or higher

@iceniveth
Copy link
Author

Yes, was on Node 20.9

image

@felixmosh
Copy link
Owner

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

@iceniveth
Copy link
Author

Yes on Windows, This is what it's showing

image

@iceniveth
Copy link
Author

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

image

Might be a Windows thing. 😅

@iceniveth iceniveth changed the title with-hono example doesn't seem to load the dashboard UI with-hono example doesn't seem to load the dashboard UI (Windows) Jun 24, 2024
@felixmosh
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

@iceniveth
Copy link
Author

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

@felixmosh
Copy link
Owner

try v5.20.4 :]

@iceniveth
Copy link
Author

Thanks a lot 🙏, works on both Linux / Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants