-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiondomain: dxRelated to developer experience of working on Docusaurus sitesRelated to developer experience of working on Docusaurus sitesgood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.If you are just getting started with Docusaurus, this issue should be a good place to begin.
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand 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
When building docusaurus, it clean the build folder first build
While setting up a Bazel build i had a file called BUILD but as I am on a case-insensitive filesystem, it prevents the folder or got catch in the glob. Creating this error message:
[ERROR] Unable to build website for locale en.
[ERROR] Error: The `cwd` option must be a path to a directory
at checkCwdOption (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js:33:9)
at generateGlobTasks (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js:42:2)
at module.exports.sync (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js:139:20)
at module.exports.sync (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/del@6.1.1/node_modules/del/index.js:119:23)
at CleanWebpackPlugin.removeFiles (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/@docusaurus+core@2.4.1_jgxnvbe4faw3ohf4h6p42qq6oy/node_modules/@docusaurus/core/lib/webpack/plugins/CleanWebpackPlugin.js:136:44)
at CleanWebpackPlugin.handleInitial (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/@docusaurus+core@2.4.1_jgxnvbe4faw3ohf4h6p42qq6oy/node_modules/@docusaurus/core/lib/webpack/plugins/CleanWebpackPlugin.js:93:14)
at /Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/@docusaurus+core@2.4.1_jgxnvbe4faw3ohf4h6p42qq6oy/node_modules/@docusaurus/core/lib/webpack/plugins/CleanWebpackPlugin.js:73:22
at Hook.eval [as call] (eval at create (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/tapable@2.2.1/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:16:1)
at Hook.CALL_DELEGATE [as _call] (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/tapable@2.2.1/node_modules/tapable/lib/Hook.js:14:14)
at /Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/webpack@5.88.1/node_modules/webpack/lib/Compiler.js:1168:23
I think the error message should be clearer to avoid confusion.
Reproducible demo
No response
Steps to reproduce
- Create a new project
- Create a file called
buildin the repository - Launch the build
Expected behavior
Fail with a more human understandable error
Actual behavior
The message displayed is:
[ERROR] Unable to build website for locale en.
[ERROR] Error: The `cwd` option must be a path to a directory
at checkCwdOption (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js:33:9)
at generateGlobTasks (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js:42:2)
at module.exports.sync (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/globby@11.1.0/node_modules/globby/index.js:139:20)
at module.exports.sync (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/del@6.1.1/node_modules/del/index.js:119:23)
at CleanWebpackPlugin.removeFiles (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/@docusaurus+core@2.4.1_jgxnvbe4faw3ohf4h6p42qq6oy/node_modules/@docusaurus/core/lib/webpack/plugins/CleanWebpackPlugin.js:136:44)
at CleanWebpackPlugin.handleInitial (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/@docusaurus+core@2.4.1_jgxnvbe4faw3ohf4h6p42qq6oy/node_modules/@docusaurus/core/lib/webpack/plugins/CleanWebpackPlugin.js:93:14)
at /Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/@docusaurus+core@2.4.1_jgxnvbe4faw3ohf4h6p42qq6oy/node_modules/@docusaurus/core/lib/webpack/plugins/CleanWebpackPlugin.js:73:22
at Hook.eval [as call] (eval at create (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/tapable@2.2.1/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:16:1)
at Hook.CALL_DELEGATE [as _call] (/Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/tapable@2.2.1/node_modules/tapable/lib/Hook.js:14:14)
at /Users/loopingz/Git/docusaurus/private/node_modules/.pnpm/webpack@5.88.1/node_modules/webpack/lib/Compiler.js:1168:23
Your environment
Mac Filesystem with case insensitive filesystem
Self-service
- I'd be willing to fix this bug myself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executiondomain: dxRelated to developer experience of working on Docusaurus sitesRelated to developer experience of working on Docusaurus sitesgood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.If you are just getting started with Docusaurus, this issue should be a good place to begin.