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

Not compatible with react-scripts 5.0.0 #21

@ameyer15801

Description

@ameyer15801

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions