Question Description
I'm trying to simultaneously run multiple commands using the Concurrently package.
My package.json:
{
"name": "emojifier",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start-dev": "concurrently -c \"yellow.bold,green.bold\" -n \"SERVER,BUILD\" \"./node_modules/.bin/ts-node-dev server/index.ts\" \"ng build --watch\" \"ng serve\""
}
}
This script works fine on Ubuntu and Mac. However, when running it via CMD or Powershell, I get the error:
[SERVER] '.' is not recognized as an internal or external command,
[SERVER] operable program or batch file.
[SERVER] ./node_modules/.bin/ts-node-dev server/index.ts exited with code 1
Why is this happening and what is a proper work-around? Is this a bug with Concurrently?
Debugging Attempts
When I switch the forward-slashes to back-slashes:
concurrently -c "yellow.bold,green.bold" -n "SERVER,BUILD" ".\node_modules\.bin\ts-node-dev.cmd .\server\index.ts" "ng build --watch" "ng serve"
The error is resolved.
If I remove the ./ prefix from the path name, the error changes to:
[SERVER] 'node_modules' is not recognized as an internal or external command,
[SERVER] operable program or batch file.
[SERVER] node_modules/.bin/ts-node-dev server/index.ts exited with code 1