-
Hello, I'm building an npm package that bootstraps a project with both a React application (either with Vite or Webpack) and a Docusaurus documentation site, served from a single Express server (generated programmatically via scripts). The entry point is index.js, which triggers my node script and generates a server.mjs file inside a target directory that combines both apps. However, when I run the generated server (server.mjs), I get the following error:
The full stack trace points to the usage of the path-to-regexp module inside Express routing logic, suggesting that one of the paths being registered is malformed. What I’ve checked:
My Questions:
Any guidance on how to avoid this route-related error when combining Docusaurus and Vite/Webpack in a single server file would be appreciated! Thanks in advance 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey, this is really impossible to help you on this. I'd suggest hardcoding things instead of generating code, and then use a debugger to see which bad input the library get and why, but that's clearly out of the scope of Docusaurus. |
Beta Was this translation helpful? Give feedback.
-
Thanks @slorber for your response, really appreciate it! |
Beta Was this translation helpful? Give feedback.
Hey, this is really impossible to help you on this.
I'd suggest hardcoding things instead of generating code, and then use a debugger to see which bad input the library get and why, but that's clearly out of the scope of Docusaurus.