Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module build failed (from ./node_modules/source-map-loader/dist/cjs.js)

I'm trying to make an ecommerce website with React. And it was working perfectly but after I install redux and react-redux, I'm getting this error:

Uncaught Error: Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, open 'D:\ProgrammingHero\foodie\client\node_modules\core-js-pure\modules\esnext.global-this.js'
    at ./node_modules/core-js-pure/modules/esnext.global-this.js (global-this.js:6:1)
    at options.factory (startup:7:1)
    at __webpack_require__ (jsonp chunk loading:133:1)
    at fn (jsonp chunk loading:367:1)
    at ./node_modules/core-js-pure/full/global-this.js (global-this.js:2:1)
    at options.factory (startup:7:1)
    at __webpack_require__ (jsonp chunk loading:133:1)
    at fn (jsonp chunk loading:367:1)
    at ./node_modules/core-js-pure/features/global-this.js (global-this.js:1:1)
    at options.factory (startup:7:1)

But if I uninstall redux and react-redux it works perfectly.

like image 639
loserarif Avatar asked May 22 '26 07:05

loserarif


2 Answers

Delete your node_module folder and then run

 npm i

It solves the problem for me

like image 154
Dante Nuñez Avatar answered May 24 '26 23:05

Dante Nuñez


Hi for the future people, I think I found the solution.

Modules will have these errors when you install them while running the application. Just exit the live share and run it again you should be fine.

like image 36
Quinten Avatar answered May 25 '26 00:05

Quinten



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!