I have a very very basic react app that I made on my desktop and pushed to git. I am now trying to clone that repo and build it on my laptop. When I clone the repo I run npm install
and when that succeeds I run yarn start
only to be greeted by this:
I really have no idea what that message means. I am going to include my package.json in case you need it. Please ask for anything else you need. How can I resolve this issue?
This is my file structure btw:
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"bootstrap": "^4.6.0",
"react": "^17.0.1",
"react-bootstrap": "^1.5.0",
"react-dom": "^17.0.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"web-vitals": "^1.0.1"
},
"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"
]
}
}
Here is the repo if you'd like to try it yourself: https://github.com/ZoeyOneOhOne/React-DOH-Template
Finally solved this. There seems to be some issue with react-scripts 4.0.3
. I changed this line in package.json:
"react-scripts": "4.0.3",
to
"react-scripts": "4.0.1",
and everything is working fine now.