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

Docusaurus Faster failed to build under yarn PnP mode #10787

Closed
6 of 7 tasks
smeng9 opened this issue Dec 21, 2024 · 1 comment
Closed
6 of 7 tasks

Docusaurus Faster failed to build under yarn PnP mode #10787

smeng9 opened this issue Dec 21, 2024 · 1 comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.

Comments

@smeng9
Copy link

smeng9 commented Dec 21, 2024

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

I expect the docusaurus faster to be working out of the box with yarn in a clean template project however it is not.

Reproducible demo

https://stackblitz.com/edit/github-vzunfajq?file=package.json,docusaurus.config.ts

Steps to reproduce

  1. Perform $ npm init docusaurus@latest with classic and TypeScript
  2. Set the package manager to latest yarn to install dependencies PnP mode $ yarn set version canary && yarn
  3. Update the docusaurus.config.ts to enable future.experimental_faster to true
  4. Build the website $ yarn build

Expected behavior

The website should be able to build

Actual behavior

It throws errors for build
● Client ██████████████████████████████████████████████████ (93%) sealing after asset optimization
● Server ██████████████████████████████████████████████████ (93%) sealing after asset optimization [ERROR] Client bundle compiled with errors therefore further build is impossible.
× Module not found: Can't resolve '/Users/[redacted]/Developer/website/.yarn/virtual/@docusaurus-core-virtual-7a135ef58f/3/.yarn/berry/cache/@docusaurus-core-npm-3.6.3-a0940a712c-10c0.zip/node_modules/@docusaurus/core/lib/client/clientEntry.js' in '/Users/[redacted]/Developer/website'

and errors for start
[INFO] Starting the development server...
[SUCCESS] Docusaurus website is running at: http://localhost:3000/
● Client ██████████████████████████████████████████████████ (100%) emitting after emit × Module not found: Can't resolve '/Users/[redacted]/Developer/website/.yarn/virtual/@docusaurus-core-virtual-7a135ef58f/3/.yarn/berry/cache/@docusaurus-core-npm-3.6.3-a0940a712c-10c0.zip/node_modules/@docusaurus/core/lib/client/clientEntry.js' in '/Users/[redacted]/Developer/website'


× Module not found: Can't resolve '/Users/[redacted]/Developer/website/.yarn/virtual/webpack-virtual-20fb5ab00f/3/.yarn/berry/cache/webpack-npm-5.97.1-b41b9903c1-10c0.zip/node_modules/webpack/hot/dev-server.js' in '/Users/[redacted]/Developer/website'


× Module not found: Can't resolve '/Users/[redacted]/Developer/website/.yarn/virtual/webpack-dev-server-virtual-13f949419a/3/.yarn/berry/cache/webpack-dev-server-npm-4.15.2-56919849cc-10c0.zip/node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=0&pathname=%2Fws&logging=warn&progress=true&overlay=%7B%22errors%22%3Atrue%2C%22warnings%22%3Afalse%7D&reconnect=10&hot=true&live-reload=false' in '/Users/[redacted]/Developer/website'


× Error: Child compilation failed:
│ × Module not found: Can't resolve '/Users/[redacted]/Developer/website/.yarn/virtual/@docusaurus-core-virtual-7a135ef58f/3/.yarn/berry/cache/@docusaurus-core-npm-3.6.3-a0940a712 c-10c0.zip/node_modules/@docusaurus/core/lib/webpack/templates/dev.html.template.ejs' in '/Users/[redacted]/Developer/website'

│ - child-compiler.js:211
│ [html-webpack-plugin-npm-5.6.3-57a7b18662-10c0.zip]/[html-webpack-plugin]/lib/child-compiler.js:211:18

│ - index.js:13681 finalCallback
│ [@rspack-core-npm-1.1.8-0093048ff4-10c0.zip]/[@rspack]/core/dist/index.js:13681:9

│ - index.js:13703
│ [@rspack-core-npm-1.1.8-0093048ff4-10c0.zip]/[@rspack]/core/dist/index.js:13703:14

│ - index.js:13805
│ [@rspack-core-npm-1.1.8-0093048ff4-10c0.zip]/[@rspack]/core/dist/index.js:13805:18

│ - index.js:473 done
│ [@rspack-lite-tapable-npm-1.0.1-a0c24b9689-10c0.zip]/[@rspack]/lite-tapable/dist/index.js:473:13

│ - index.js:480 AsyncSeriesHook.callAsyncStageRange
│ [@rspack-lite-tapable-npm-1.0.1-a0c24b9689-10c0.zip]/[@rspack]/lite-tapable/dist/index.js:480:20

│ - index.js:82 AsyncSeriesHook.callAsync
│ [@rspack-lite-tapable-npm-1.0.1-a0c24b9689-10c0.zip]/[@rspack]/lite-tapable/dist/index.js:82:21

│ - index.js:13801
│ [@rspack-core-npm-1.1.8-0093048ff4-10c0.zip]/[@rspack]/core/dist/index.js:13801:33

│ - index.js:13845
│ [@rspack-core-npm-1.1.8-0093048ff4-10c0.zip]/[@rspack]/core/dist/index.js:13845:37


client (Rspack 1.1.8) compiled with 8 errors

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used: 3.6.3
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Safari 17.5, Node.js 20.10
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS Sonoma 14.5

Self-service

  • I'd be willing to fix this bug myself.
@smeng9 smeng9 added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Dec 21, 2024
@slorber slorber added external This issue is caused by an external dependency and not Docusaurus. and removed status: needs triage This issue has not been triaged by maintainers labels Dec 23, 2024
@slorber
Copy link
Collaborator

slorber commented Dec 23, 2024

This is a bug in Rspack, not Docusaurus

Tracked here: web-infra-dev/rspack#2236

@slorber slorber closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution external This issue is caused by an external dependency and not Docusaurus.
Projects
None yet
Development

No branches or pull requests

2 participants