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

Koa error #822

Open
dan335 opened this issue Sep 19, 2024 · 4 comments
Open

Koa error #822

dan335 opened this issue Sep 19, 2024 · 4 comments

Comments

@dan335
Copy link

dan335 commented Sep 19, 2024

I get this error when using with Koa.

Error: ENOENT: no such file or directory, open 'D:\web\ai_ledger\views\index.ejs.html'

I'm guessing it's because I'm using @koa/router instead of koa-router which is not supported anymore.

@felixmosh
Copy link
Owner

Hi @dan335
It looks like it is not related to the router version.
For some reason, this line is not working.
Check the reason for that (maybe you are using bundler for the node part?)
Anyway, you can provide options.uiBasePath by yourself, it shoud get the path to the node_modaules/@bull-board/ui folder.

@dan335
Copy link
Author

dan335 commented Sep 23, 2024

Still can't get this to work. See anything wrong? The output of console.log(uiBasePath) is the correct path.

const serverAdapter = new KoaAdapter();

serverAdapter.setBasePath('/admin/queues');

const uiBasePath = join(__dirname, '../', 'node_modules', '@bull-board', 'ui');

console.log(uiBasePath)

createBullBoard({
  queues: [
    new BullMQAdapter(queueUpdateTransactionCategory),
    new BullMQAdapter(queueTrainModel),
    new BullMQAdapter(queueSyncTransactions),
  ],
  serverAdapter,
  options: { uiBasePath }
});

await app.use(serverAdapter.registerPlugin());

Also tried

const uiBasePath = join(__dirname, '../', 'node_modules', '@bull-board', 'ui', 'package.json');

@felixmosh
Copy link
Owner

This is weird, can you debug it, maybe it is related to the fact that you are using windows.

@felixmosh
Copy link
Owner

Any update?

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

No branches or pull requests

2 participants