react-refresh-webpack-plugin icon indicating copy to clipboard operation
react-refresh-webpack-plugin copied to clipboard

Getting this error: Module not found: Error: Can't resolve 'core-js-pure/features/global-this'

Open gobinda-fe opened this issue 3 years ago • 4 comments

When trying to run dev server getting this error ERROR in ./packages/lib-build-tools/node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js 2:17-61 Module not found: Error: Can't resolve 'core-js-pure/features/global-this' in '/Users/PATH_TO_CODEBASE/frontend/packages/lib-build-tools/node_modules/@pmmmwh/react-refresh-webpack-plugin/client'

gobinda-fe avatar Jul 24 '22 13:07 gobinda-fe

react-scripts@^5.0.1: version "5.0.1"

dependencies: "@pmmmwh/react-refresh-webpack-plugin" "0.4.3"

donyFeng6 avatar Jul 27 '22 10:07 donyFeng6

I have ejected from CRA. Is there any way to fix this?

gobinda-fe avatar Jul 27 '22 12:07 gobinda-fe

I had a similar error when I missed '.js' in 'resolve.extensions'. https://webpack.js.org/configuration/resolve/#resolveextensions

vasilews avatar Aug 13 '22 16:08 vasilews

I am getting this error as well. When I run npm ls core-js-pure, this is what I get:

└─┬ [email protected]
  └─┬ @pmmmwh/[email protected]
    └── core-js-pure@ invalid: "^3.8.1" from node_modules/@pmmmwh/react-refresh-webpack-plugin

When you check the npm page for that version, there is a very loud message that says the dependency is deprecated. @pmmmwh, please update the version of core-js-pure you are using in this repo.

AndrewOttavianoAbb avatar Sep 14 '22 14:09 AndrewOttavianoAbb