Edit
I updated the Node version and it started working successfully
I changed my computer and moved all my React projects to the new computer but I can never run the npm start command, Note that the project was working properly before. I followed all the instructions on the web and on the Stack Overflow website.
- Make sure that the npm version is above 6, the Node version is above 10, and that npx is present
- Make sure to add a script called start in the package.
But this error appears to me
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! small_buying_app@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the small_buying_app@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! C:\Users\MASTER\AppData\Roaming\npm-cache\_logs\2021-12-25T20_32_44_910Z-debug.log
package file
{
"type": "module",
"name": "online-library",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.2.1",
"react-scripts": "4.0.3",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "node index.js",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"sass": "^1.45.1"
}
}