-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Docusaurus fails to build in docker (Module not found: Can't resolve ...) #10683
Comments
Also see web-infra-dev/rspack#8433. |
Have you tried fully regenerating your lock file? It should work with Rspack 1.1.1 Is this only happening inside Docker, and not outside? How can we be sure this is even related to docker? Can we have a repro including an exact lockfile? |
Lock file has been fully regenerated. Local builds indeed work correctly, for me this only happens in Docker containers. Issue seems not to be isolated to Docusaurus, as more reports are coming in from different projects that use
This is not necessarily within my area of expertise, but different bindings based on different platforms could explain why the build succeeds locally, but fails in a Docker container. Could also imply that it will success/fail depending on your platform altogether. As for the lockfile, please refer to this repository. Note that I only generated the |
I see, thanks for investigating, will track the Rspack related issue. |
Looking into this a bit further, alpine contains use As mentioned above, I made this issue mostly to inform others that run into this problem, I will report any further findings in the |
Seeing the same issue when the creating a clean project and running directly on linux (not in docker).
project initially builds fine but after adding
see the same Module not found: Can't resolve clientEntry.js message, setting |
Should be resolved in the upcoming |
Going to assume it's fixed if you upgrade Rspack to v1.1.2 (which our deps range allow you to do) Let us know if it's not the case |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
With the latest version of Docusaurus, builds seem to fail inside Docker containers due to resolve issues. This is an issue with
@docusaurus/faster
when enablingrspackBundler
in theexperimental_faster
. This introduces the dependency on@rspack/bindings@1.1.1
, which currently fails to resolvenode_modules
in Docker containers.Docusaurus uses
@rspack/core@^1.0.14
, however, this resolves@rspack/bindings@1.1.1
rather than@rspack/bindings@@1.0.14
.This issue is more meant for people currently experiencing this behavour. To fix it, at least for
yarn
, add the following topackage.json
:Reproducible demo
No response
Steps to reproduce
npx create-docusaurus@latest my-website classic --typescript
cd my-website
yarn add @docusaurus/faster
future: { experimental: true },
to thedocusaurus.config.ts
docker run --rm -it -v .:/my-website node:18.20-alpine sh
cd my-website
yarn build
Expected behavior
For the Docusaurus website to build without any issues.
Actual behavior
The following error is shown
Your environment
3.6.1
node:18.20-alpine
, but persists accross multiple imagesUbuntu 20.04 LTS
Self-service
The text was updated successfully, but these errors were encountered: