-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Build error The cwd
option must be a path to a directory when a file called build
exists
#9110
Comments
cwd
option must be a path to a directorycwd
option must be a path to a directory when casing doesn't match
Hey Thanks for reporting
Does it actually matter? I'm not sure to understand anymore. The problematic code: import { sync as delSync } from "del";
const deleted = delSync(patterns, {
force: false,
// Change context to build directory
cwd: this.outputPath,
dryRun: false,
dot: true,
ignore: this.protectWebpackAssets ? this.currentAssets : []
});
How do you see us handle this exactly? What should be the error message? We can check if We can also delete the |
Mmmm, I may have misread the issue. So it's about a file called |
cwd
option must be a path to a directory when casing doesn't matchcwd
option must be a path to a directory when a file called build
exists
Ah, didn't see you renamed the issue :)
Yes We could also ignore the deletion error, but not sure it would be a good idea anyway because it could lead to downstream errors due to unability to create the build folder.
Marking this as a good first-time contribution, so feel free to send a PR (no need to claim the issue) Modifications should be done in If the |
I actually found a better method using |
Thank you for the quick answer and fix |
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
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:I think the error message should be clearer to avoid confusion.
Reproducible demo
No response
Steps to reproduce
build
in the repositoryExpected behavior
Fail with a more human understandable error
Actual behavior
The message displayed is:
Your environment
Mac Filesystem with case insensitive filesystem
Self-service
The text was updated successfully, but these errors were encountered: