You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the console error message carefully (if applicable).
Description
I have a project that doesn't contain a static assets directory. This prevents the Webpack dev server from running due to a misconfiguration of the plugins added by Docusaurus. I was able to workaround this issue by adding a static directory and adding some content to it.
[SUCCESS] Docusaurus website is running at: http://localhost:3000/
[ERROR] TypeError: Cannot read properties of undefined (reading 'constructor')
at /Users/william.kirby/Code/my-project/node_modules/webpack-dev-server/lib/Server.js:1860:22
at Array.find (<anonymous>)
at /Users/william.kirby/Code/my-project/node_modules/webpack-dev-server/lib/Server.js:1859:60
at Array.forEach (<anonymous>)
at Server.initialize (/Users/william.kirby/Code/my-project/node_modules/webpack-dev-server/lib/Server.js:1846:17)
at Server.start (/Users/william.kirby/Code/my-project/node_modules/webpack-dev-server/lib/Server.js:3358:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.start (/Users/william.kirby/Code/my-project/node_modules/@docusaurus/core/lib/commands/start/start.js:42:5)
[INFO] Docusaurus version: 3.4.0
Node version: v18.18.0
This appears to be a regression introduced in v3.4.0 by this PR: #9859
The createStaticDirectoriesCopyPlugin function returns undefined when no static directories exist and Webpack isn't able to handle this.
Same issue here, and I am actually required to have this fixed asap, as I have a deadline, when my site has to be finished, so I would be willing to look into this issue as well :)
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
I have a project that doesn't contain a static assets directory. This prevents the Webpack dev server from running due to a misconfiguration of the plugins added by Docusaurus. I was able to workaround this issue by adding a
static
directory and adding some content to it.This appears to be a regression introduced in
v3.4.0
by this PR: #9859The
createStaticDirectoriesCopyPlugin
function returnsundefined
when no static directories exist and Webpack isn't able to handle this.Reproducible demo
No response
Steps to reproduce
static
directoryExpected behavior
I would expect the development server to run even if no static assets exist.
Actual behavior
The development server failed to start.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: