-
-
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 executiongood 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
Issue #6722 has been fixed by passing the --poll CLI option as a watch option to WebPack. However, webpack expects the value to be passed either as a number or boolean. As a result, the cli option which ends up passing as a string errors out.
Just simply trying
docusaurus start --poll 1000
gives the following error
[ERROR] ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
- configuration.watchOptions.poll should be one of these:
number | boolean
-> Enable polling mode for watching.
Details:
* configuration.watchOptions.poll should be a number.
-> `number`: use polling with specified interval.
* configuration.watchOptions.poll should be a boolean.
-> `true`: use polling.
Reproducible demo
No response
Steps to reproduce
Locally run the following and see the error
docusaurus start --poll 1000
Expected behavior
Ideally the watching should take effect by polling.
Actual behavior
The server doesn't start and errors out.
See webpack/webpack#3048 which mentions similar issue of passing the option via env variable which is treated as a string.
Your environment
No response
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 executiongood 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.