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

817
Views
Los programas de inicio de React JS npm no pudieron compilar web-vitals

no se pudo compilar -/src/reportWebVitals.js Módulo no encontrado: no se puede resolver 'web-vitals'. Ya que JS reacciono nuevo, no pude encontrar que paso. Aquí está el archivo reportWebVitals.JS. Gracias de antemano por la ayuda.

"/src/reportWebVitals.js Módulo no encontrado: No se puede resolver 'web-vitals' en 'E:\ReactResources\RectProjects\test-app\src'"

 const reportWebVitals = onPerfEntry => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); }); }}; export default reportWebVitals;
over 4 years ago · Santiago Trujillo
5 answers
Answer question

0

Elimine todos los archivos y carpetas dentro de la carpeta de la aplicación de prueba. Vuelva a instalar todos los paquetes ahora e inicie npm. Funcionará.

over 4 years ago · Santiago Trujillo Report

0

Necesitas instalar web vitals. Abre tu terminal y ejecuta el siguiente comando:

 npm i web-vitals --save-dev

Además, eliminar todo y reinstalar podría funcionar, pero ese es un proceso más largo.

over 4 years ago · Santiago Trujillo Report

0

Si ha creado su proyecto con create-react-app , todas las dependencias deberían estar allí cuando ejecuta npm install .

Asegúrese de haberlo hecho navegando al directorio raíz y ejecutando:

 npm install
over 4 years ago · Santiago Trujillo Report

0

Para cualquiera que venga aquí desde el inicio de una nueva aplicación con create-react-app : si está usando npm pero ejecuta create-react-app sin especificarlo explícitamente, usará yarn cuando esté disponible. Pude evitar este problema agregando el indicador --use-npm .

Así por ejemplo:

 npx create-react-app my-app --use-npm

Fuente

over 4 years ago · Santiago Trujillo Report

0

Cerré mi terminal y volví a abrir. ¡Funciona para mi!

over 4 years ago · Santiago Trujillo 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!