Skip to content
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

Webpack 5 error #25

Closed
livelxw opened this issue May 7, 2021 · 3 comments
Closed

Webpack 5 error #25

livelxw opened this issue May 7, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@livelxw
Copy link

livelxw commented May 7, 2021

when call:
docusaurus start

it throws:
Module not found: Error: Can't resolve 'path' in './node_modules/@redocly/openapi-core/lib/config'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.

docusaurus version:
2.0.0-alpha.75

@sibelius
Copy link

you need to polyfll node apis for webpack 5

check this https://gist.github.com/sibelius/24f63eef7f43b15dc73c4a0be11bbef8

@rohit-gohri rohit-gohri added the bug Something isn't working label May 12, 2021
@rohit-gohri rohit-gohri self-assigned this May 12, 2021
rohit-gohri added a commit that referenced this issue May 12, 2021
Added back node polyfills until redoc supports Webpack 5: Redocly/redoc#1584

Closes #25 #37
@rohit-gohri rohit-gohri reopened this May 13, 2021
@rohit-gohri
Copy link
Owner

I fixed polyfills in latest PR #40 but I'm getting this error now:

TypeError: Cannot read property 'split' of undefined
error building locale=en
Error: Failed to compile with errors.
    at /Users/rohitgohri/Projects/personal/redocusaurus/node_modules/@docusaurus/core/lib/webpack/utils.js:198:24
    at /Users/rohitgohri/Projects/personal/redocusaurus/node_modules/webpack/lib/MultiCompiler.js:550:14
    at processQueue (/Users/rohitgohri/Projects/personal/redocusaurus/node_modules/webpack/lib/MultiCompiler.js:488:6)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

Might be related to facebook/docusaurus#3515 maybe as I'm using yarn workspaces now. Still investigating.

@rohit-gohri
Copy link
Owner

Fixed in v0.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants