Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

339
Views
problema con React Scripts y terser-webpack-plugin

Ayer, de repente comencé a recibir este error al ejecutar el script 'npm start' en mi aplicación create-react. Nunca antes tuve este problema y no he cambiado ninguna configuración o archivo package.json dentro o fuera de los scripts de reacción. terser-webpack-plugin está instalado en la ubicación y su "principal" es:

 "main": "dist/index.js",

He intentado reinstalar node_modules sin suerte. También probé la solución aquí: use el último terser-webpack-plugin con Webpack5

 throw err; ^ Error: Cannot find module 'Z:\Documents\chat-test\my-app\node_modules\terser-webpack-plugin\dist\index.js'. Please verify that the package.json has a valid "main" entry at tryPackage (node:internal/modules/cjs/loader:353:19) at Function.Module._findPath (node:internal/modules/cjs/loader:566:18) at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (Z:\Documents\chat-test\my-app\node_modules\react-scripts\config\webpack.config.js:18:22) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) { code: 'MODULE_NOT_FOUND', path: 'Z:\\Documents\\chat-test\\my-app\\node_modules\\terser-webpack-plugin\\package.json', requestPath: 'terser-webpack-plugin' }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Posibles soluciones, pruebe una o ambas:

  • npm i --save-dev terser-webpack-plugin
  • Elimine package.lock y ejecute npm i
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!