"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"server": "nodemon backend/server.js",
"client": "npm start --prefix frontend",
"dev": "concurrently \"npm run server\" \"npm run client\""
}
here's my scripts for the package.json file that's outside the frontend and backend folders (in the root folder). and when I run the command npm run dev
it doesn't work for some reason. note that npm run server
and npm run client
work prefectly but the issue is when I run the command npm run dev
which has the concurrently
in it, I don't know what's the issue, is there something I can do to fix this? here's the error message that I get:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `concurrently "npm run server" "npm run client"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev 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/user/.npm/_logs/2021-01-29T18_24_43_756Z-debug.log
npm run server && npm run client
– Hearnnpm run server
andnpm run client
work just fine when executed separately, but when I run thenpm run dev
(which contains theconcurrently
) it doesn't work, So I guess there must be a problem withconcurrently
right? – Cracklingconcurrently
does I assume it runs both simultaneously, now if client is dependent on the server that might cause the issue. – Hearn