I am working on a React app that I just pulled down from Github. I ran an npm ci once pulled down and opened the project hoping it would run. I'm getting an error when I am trying to run the client and server using npm run dev by use of concurrently.
What I'm not understanding is other developers have opened the project and have no problem getting the project to run. Is there a problem with my computer's configuration or is this an npm issue?
Error Message:
[1] > [email protected] client /Users/sam/Desktop/SchoolFolder/Capstone/march17/PrestonFoodBank
[1] > npm start --prefix client
[1]
[0]
[0] > [email protected] server /Users/sam/Desktop/SchoolFolder/Capstone/march17/PrestonFoodBank
[0] > nodemon server.js
[0]
[0] [nodemon] 2.0.15
[0] [nodemon] to restart at any time, enter `rs`
[0] [nodemon] watching path(s): *.*
[0] [nodemon] watching extensions: js,mjs,json
[0] [nodemon] starting `node server.js app.js`
[1]
[1] > [email protected] start /Users/sam/Desktop/SchoolFolder/Capstone/march17/PrestonFoodBank/client
[1] > react-scripts start
[1]
[1] sh: react-scripts: command not found
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! syscall spawn
[1] npm ERR! file sh
npm ERR! errno ENOENT
[1] npm ERR! [email protected] start: `react-scripts start`
[1] npm ERR! spawn ENOENT
[1] npm ERR!
[1] npm ERR! Failed at the [email protected] start script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1] npm WARN Local package.json exists, but node_modules missing, did you mean to install?
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /Users/sam/.npm/_logs/2022-03-17T20_08_54_290Z-debug.log
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! [email protected] client: `npm start --prefix client`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the [email protected] client script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
npm ERR! A complete log of this run can be found in:
[1] npm ERR! /Users/sam/.npm/_logs/2022-03-17T20_08_54_325Z-debug.log
[1] npm run client exited with code 1
[0] server up on http://localhost:5001
[0] Executing (default): SELECT 1+1 AS result
[0] Database synced
package.json:
{
"name": "PFP-Skeleton",
"version": "1.0.0",
"description": "",
"main": "app.js",
"dependencies": {
"bcrypt": "^5.0.1",
"config": "^3.3.7",
"cors": "^2.8.5",
"express": "^4.17.2",
"jsonwebtoken": "^8.5.1",
"pg": "^8.7.3",
"pg-hstore": "^2.3.4",
"sequelize": "^6.16.1",
"tedious": "^14.3.0"
},
"devDependencies": {
"concurrently": "^7.0.0",
"nodemon": "^2.0.15"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node app.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"clientinstall": "npm install --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\""
},
"keywords": [],
"author": "",
"license": "ISC"
}