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

@bull-board/* packages aren't included in the ~/.output/server/node_modules directory #5

Open
devi4nt opened this issue Apr 16, 2024 · 0 comments

Comments

@devi4nt
Copy link

devi4nt commented Apr 16, 2024

A little context first.. We're deploying our Nuxt application within a Docker container & in order to keep the image size down, we would ideally like to only include the ~/.output folder within our final image. This causes the following error within our application because the @bull-board/* dependencies are not included alongside the rest of the bundled packages within ~/.output/server/node_modules

This can be replicated in the nuxt-concierge module playground by performing the following steps.

  • Perform a production build
  • Temporarily rename the node_modules folder to something else
  • Finally, attempt to access the bull board ui via http://localhost:3000/_concierge/

You'll get the following error, which makes total sense because like our docker container the top level node_modules folder is not present, so the following line from ~/nuxt-concierge/src/runtime/server/routes/ui-handler.ts

  const uiPath = dirname(
    await resolvePath("@bull-board/ui/package.json", {
      url: import.meta.url,
    })
  );

Can't locate the @bull-board/ui package and instead throws the following error.

Error: ENOTDIR: not a directory, open '/absolute/path/to/the/repo/nuxt-concierge/playground/.output/server/index.mjs/package.json'

Is it possible to ensure that Nuxt includes the @bull-board/* dependency within the ~/.output/server/node_modules output directory? Failing that are you aware of any work arounds we can use for this other than just manually copying the missing modules into the ~/.output/server/node_modules folder.

P.S. Thanks for your work on the module & also the H3 adapter for bull-board! We're really excited about the possibility of leveraging bullmq within a Nuxt application!

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

1 participant