Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Not compatible with react-scripts 5.0.0 #21

Open
ameyer15801 opened this issue Apr 10, 2022 · 1 comment
Open

Not compatible with react-scripts 5.0.0 #21

ameyer15801 opened this issue Apr 10, 2022 · 1 comment

Comments

@ameyer15801
Copy link

The tutorials and this template app do not build or start with the latest redoc and react-scripts versions due to many errors about polyfills for node.js core modules, all coming from redoc code

This does not work:

  "dependencies": {
    "core-js": "^3.21.1",
    "mobx": "^6.5.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "redoc": "^2.0.0-rc.66",
    "styled-components": "^5.3.5"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build"
  },
  "devDependencies": {
    "react-scripts": "^5.0.0"
  }

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.

Keeping everything the same, but downgrading react-scripts, makes it work again.

  "devDependencies": {
    "react-scripts": "4.0.3"
  }

react-scripts hides webpack configurations, so we cannot provide fallbacks as suggested. This was previously mentioned as being fixed a couple months ago, but I have been stuck on this error for 2 days until I figured out the downgrade workaround.

@SafaMjn
Copy link

SafaMjn commented Jan 13, 2023

Is there a workaround without downgrading the react-scripts version?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants