question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[React] It does not work properly in webpack 5.24.4 version.

See original GitHub issue

Describe the bug

The following error occurs at runtime when running in webpack 5.24.4 version. image

I will attach the contents of package.json so that you can reproduce it.

  "dependencies": {
    "@babel/core": "^7.13.10",
    "@babel/preset-env": "^7.13.10",
    "@babel/preset-react": "^7.12.13",
    "@babel/preset-typescript": "^7.13.0",
    "@testing-library/jest-dom": "^5.11.9",
    "@testing-library/react": "^11.2.5",
    "@toast-ui/react-chart": "^4.1.4",
    "@types/react": "^17.0.3",
    "@types/react-chartjs-2": "^2.5.7",
    "@types/react-dom": "^17.0.2",
    "babel-jest": "^26.6.3",
    "babel-loader": "^8.2.2",
    "css-loader": "^5.1.2",
    "error-overlay-webpack-plugin": "^0.4.2",
    "html-loader": "^2.1.2",
    "html-webpack-plugin": "^5.3.1",
    "mini-css-extract-plugin": "^1.3.9",
    "prettier": "^2.2.1",
    "react": "^17.0.1",
    "react-chartjs-2": "^2.11.1",
    "react-dom": "^17.0.1",
    "source-map-loader": "^2.0.1",
    "ts-loader": "^8.0.17",
    "ts-node": "^9.1.1",
    "typescript": "^4.2.3",
    "webpack": "^5.24.4",
    "webpack-cli": "^4.5.0"
  },
  "devDependencies": {
    "jest": "^26.6.3",
    "jest-config": "^26.6.3",
    "@jest/types": "^26.6.2",
    "@typescript-eslint/eslint-plugin": "^4.17.0",
    "@typescript-eslint/parser": "^4.17.0",
    "eslint": "^7.21.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-prettier": "^8.1.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prettier": "^3.3.1",
    "eslint-plugin-react": "^7.22.0",
    "eslint-plugin-react-hooks": "^4.2.0",
    "webpack-dev-server": "^3.11.2"
  }

Additional context

After downgrading the webpack version to 4.44.2, it works normally

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jung-hancommented, Mar 26, 2021

@dragonsuperf @detygon

The problem will be fixed and released in version 4.2.1. The wrapper didn’t provide an ESM, so the problem could be fixed. However, it was not possible to understand exactly how it was affected by the user webpack version, so the issue was posted on the webpack repo. I’ll let you know when that version is available. Thank you!

0reactions
stale[bot]commented, Jun 9, 2021

This issue will be closed due to inactivity. Thanks for your contribution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot find module 'webpack' using webpack-dev-server
Tried to delete node_modules and package-lock.json and then reinstall the modules, and nothing happened as well. Any suggestions? Adding package ...
Read more >
Webpack - npm
Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
Webpack 5 errors | ImmutableX Documentation
The reason for this error is that create-react-app uses a version of webpack greater than 5, which, unlike versions < 5, does not...
Read more >
To v5 from v4 - webpack
This guide aims to help you migrating to webpack 5 when using webpack directly. If you are using a higher level tool to...
Read more >
How to Upgrade to React 17 and Webpack 5 Step by Step
Make sure your Node version is above 10.13.0. > node -v v12. · Install Webpack 5. > yarn add webpack@latest yarn add v1.22.10...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found