'npm run client & npm run server not running properly (won't run at the same time)
In the image you can see the scripts I am using, and on the left side is the folders hierarchy.
According to the defined script when I am running npm run watch, it should run server script and client script as well. But it's only running one script server. It never actually runs the client script.
Same thing happens if I put it like npm run client & npm run server in watch script. It runs only client script and never reaches server script.
One more: If I run npm install it doesn't install as defined in the script. Throws error EISDIR (error shown in image).
Please explain why is this happening and how I can fix this.
Solution 1:[1]
there is a npm package called concurrently, you can install it as dev dependency and use it to run your watch script.
first install concurrently: "npm isntall concurrently --save"
then on your script: "watch": "concurrently "npm run server" "npm run client""
you can now run both server and client from one script.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |


