open-cli-tools / concurrently

Run commands concurrently. Like `npm run watch-js & npm run watch-less` but better.
https://www.npmjs.com/package/concurrently
MIT License
7.16k stars 234 forks source link

"program not found or is not executable" when running with concurrently #208

Open clehene opened 4 years ago

clehene commented 4 years ago

I'm able to run two watchers (chokidar and tsc -w). One of them launches a protoc with a plugin. This works properly when run independently, however when running with concurrently I get:

/common/node_modules/.bin/protoc-gen-grpc-web: program not found or is not executable
[0] Please specify a program using absolute path or make sure the program is available in your PATH system variable
[0] --grpc-web_out: protoc-gen-grpc-web: Plugin failed with status code 1.
error Command failed with exit code 1.

The program is both in path and executable

gustavohenke commented 4 years ago

Hi there! It's a bit difficult to help with just the provided information. Do you mind trying to create a small example that replicates your issue? Or at least listing out the involved commands + packages needed to reproduce.

lucky-lou commented 4 years ago

I'm experiencing the same issue with different commands. "start": "npx concurrently --handle-input \"npx wait-on dist/index.js && npx nodemon\" \"tsc -w -p tsconfig.build.json\" ",

The error returned is from wait-on:

[2] operable program or batch file.
[2] dist/index.js exited with code 1

when I run npx wait-on dist/index.js && npx nodemon i have no issues

gustavohenke commented 4 years ago

@lucky-lou you seem to be using Windows. Can you please provide the rest of the output that you get?

lucky-lou commented 4 years ago

@gustavohenke



npx: installed 1 in 1.417s
Path must be a string. Received undefined
null
[2] 'dist' is not recognized as an internal or external command,
[2] operable program or batch file.
[2] dist/app/index.js exited with code 1
[1] Usage: wait-on {OPTIONS} resource [...resource]
[1]
[1] Description:
[1]
[1]      wait-on is a command line utility which will wait for files, ports,
[1]      sockets, and http(s) resources to become available (or not available
[1]      using reverse flag). Exits with  success code (0) when all resources
[1]      are ready. Non-zero exit code if interrupted or timed out.
[1]
[1]      Options may also be specified in a config file (js or json). For
[1]      example --config configFile.js would result in configFile.js being
[1]      required and the resulting object will be merged with any
[1]      command line options before wait-on is called. See exampleConfig.js
[1]
[1]      In shell combine with && to conditionally run another command
[1]      once resources are available. ex: wait-on f1 && NEXT_CMD
[1]
[1]      resources types are defined by their prefix, if no prefix is
[1]      present, the resource is assumed to be of type 'file'
[1]
[1]      resource prefixes are:
[1]```