React is installed properly and everything else works, except when I try to run "npm start" in the terminal, it gives me the following error.
Here's my package.json code:
{
"name": "r3-ui",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.2",
"@testing-library/user-event": "^12.2.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"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"
]
}
}
Check the ignore-script config If you see the start script is present inside your package. json file but still can't run the script, you need to check the console output. If there's no output at all, then you may have the ignore-scripts npm configuration set to true .
If you really need create-react-app , you might need to reinstall Node and reconfigure your dependencies to ensure you have a fresh start with Node, npm, npx, and the like. This is a good resource for updating and reinstalling Node.
With the start argument, NPM will begin the process to make a development server available for your React application. Here's a list of tasks for this script: Set the build environment into development for Node and Babel. Ensure environment variables are read for the build process.
Do not use &
when naming the directory on Windows. Rename UI & Web Design
into UI_Web_Design
. Anything after the &
is treated as a command.
After changing the name of the directory run npm start
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With