Me pueden colaborar, me sale este error al ejecutar npm run start y lo ejecute con sudo npm run start y tampoco por fa <code>npm ERR! cod...

Pregunta de la clase:
Create-react-app
Manuel Rivera

Manuel Rivera

Pregunta
studenthace 5 años

Me pueden colaborar, me sale este error al ejecutar npm run start y lo ejecute con sudo npm run start y tampoco por fa

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-js@0.1.0 start: `react-scripts start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-js@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/manuelr/.npm/_logs/2019-12-11T08_48_34_995Z-debug.log```
9 respuestas
para escribir tu comentario
    Gabriel De Andrade

    Gabriel De Andrade

    studenthace 5 años

    Antes de borrar la carpeta del proyecto intenta también borrar el package-lock.json, allí se guardan todas las versiones exactas y puede estar causando errores también

    Juan Castro

    Juan Castro

    teacherhace 5 años

    Yo intentaría con

    npm cache clean --force
    .

    Aunque también está la otra opción: borra toda esta carpeta y volver a usar create react app para crear el proyecto. :thinking::sweat_smile:

    Puedes tratar de arreglarlo todo en la carpeta donde ya estás ahora, más que todo por aprendizaje, así ya sabrás qué hacer si te vuelve a pasar. Pero si no funciona y ya quieres continuar el curso puedes tratar de volver a empezar en otra carpeta. :muscle:

    Manuel Rivera

    Manuel Rivera

    studenthace 5 años

    Juan bro, voy en el segundo comando y realice el npm cache clean y me sale lo siguiente

    npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one. npm ERR! npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force. npm ERR! A complete log of this run can be found in: npm ERR! /home/manuelr/.npm/_logs/2019-12-11T16_47_16_944Z-debug.log``` ejecuto el comando como lo dicen ahí con --force ? o con un cache temporal? o sigo con el comando 3 que es npm instal ? bro
    Juan Castro

    Juan Castro

    teacherhace 5 años

    Entre el segundo y tercer comando puedes correr también

    npm cache clean
    .

    Manuel Rivera

    Manuel Rivera

    studenthace 5 años

    acabo de hacer algunas soluciones de otros comentarios y tampoco, borre la carpeta node modules y la volvi a instalar, ejecute el comando npm install -g npm, incluso hice este comando npm install react-scriptshice pero me boto unos errores, que no encontraba la carpeta algo así, después de esto hice npm start y me sale

    npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! react-js@0.1.0 start: `react-scripts start` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the react-js@0.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/manuelr/.npm/_logs/2019-12-11T16_27_00_000Z-debug.log```
    Manuel Rivera

    Manuel Rivera

    studenthace 5 años

    si claro, ya había ejecutado npm install, y también tengo la carpeta node modules, esta tiene muchas carpetas y el nombre que le tengo a la carpeta donde hice el create-react-app se llama Curso de React JS y a la carpeta que cree con create-reac-app le puse como nombre react-js y me instalo las carpetas y archivos que tiene el docente, pero el npm run start me sale lo de arriba

    Juan Castro

    Juan Castro

    teacherhace 5 años

    ¿Ya corriste npm install?

    Nicolas Esteban Prieto Sarmiento

    Nicolas Esteban Prieto Sarmiento

    studenthace 5 años
    • Revisa que tenga node modules
    • también revisa que en la carpeta donde hiciste
      create-react-app
      no tenga símbolos ni espacios, me comentas si te ayuda
Curso de React.js [Empieza Gratis]

Curso de React.js [Empieza Gratis]

React es una de las librerías más utilizadas hoy para crear aplicaciones web. Aprende desde la creación y diseño de componentes hasta traer datos de un API. Desarrolla aplicaciones web de muy alta calidad en tiempo record con React.js

Curso de React.js [Empieza Gratis]
Curso de React.js [Empieza Gratis]

Curso de React.js [Empieza Gratis]

React es una de las librerías más utilizadas hoy para crear aplicaciones web. Aprende desde la creación y diseño de componentes hasta traer datos de un API. Desarrolla aplicaciones web de muy alta calidad en tiempo record con React.js