@bull-board/* packages aren't included in the ~/.output/server/node_modules directory
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!