
Jesús Alfonso León Luna
PreguntaHola. Alguien podría ayudarme , por favor, a entender qué está sucediendo? Cuando ejecuto npm run start se renderiza bien la
acá una pequeña parte de lo que aparece en la consola (el inicio y el final):
WARNING in ./node_modules/jest-worker/build/WorkerPool.js 22:4-29
Module not found: Error: Can’t resolve ‘worker_threads’ in ‘/home/jesus/CursosPlatzi/ReactPractico/node_modules/jest-worker/build’
@ ./node_modules/jest-worker/build/index.js 38:41-64
@ ./node_modules/terser-webpack-plugin/dist/index.js 19:4-26
@ ./node_modules/webpack/lib/config/defaults.js 1125:25-57
@ ./node_modules/webpack/lib/index.js 331:10-66
@ ./src/containers/Login.jsx 2:0-30
@ ./src/components/App.jsx 3:0-40 7:89-94
@ ./src/index.js 3:0-35 4:50-53
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.
If you want to include a polyfill, you need to:
- add a fallback ‘resolve.fallback: { “path”: require.resolve(“path-browserify”) }’
- install 'path-browserify’
If you don’t want to include a polyfill, you can use an empty module like this:
resolve.fallback: { “path”: false }
@ ./node_modules/webpack/lib/CleanPlugin.js 12:17-37
@ ./node_modules/webpack/lib/index.js 144:9-33
@ ./src/containers/Login.jsx 2:0-30
@ ./src/components/App.jsx 3:0-40 7:89-94
@ ./src/index.js 3:0-35 4:50-53
ERROR in ./node_modules/webpack/lib/util/identifier.js 7:13-28
Module not found: Error: Can’t resolve ‘path’ in ‘/home/jesus/CursosPlatzi/ReactPractico/node_modules/webpack/lib/util’
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.
If you want to include a polyfill, you need to:
- add a fallback ‘resolve.fallback: { “path”: require.resolve(“path-browserify”) }’
- install 'path-browserify’
If you don’t want to include a polyfill, you can use an empty module like this:
resolve.fallback: { “path”: false }
@ ./node_modules/webpack/lib/Compiler.js 33:30-58
@ ./node_modules/webpack/lib/index.js 150:9-30
@ ./src/containers/Login.jsx 2:0-30
@ ./src/components/App.jsx 3:0-40 7:89-94
@ ./src/index.js 3:0-35 4:50-53
56 errors have detailed information that is not shown.
Use ‘stats.errorDetails: true’ resp. ‘–stats-error-details’ to show it.
webpack 5.66.0 compiled with 56 errors and 12 warnings in 8960 ms

Jesús Alfonso León Luna
Hola. Gracias por responder. Acá dejo el link del proyecto en Github https://github.com/jleonluna25/ReactPractico

Victor Alfonso Pinedo Martinez
Hola Jesús, podrías compartirnos una captura de tu configuración de webpack para tener más chance de ayudarte!