"concurrently: command not found" despite being installed
Solution 1
When you install using npm install
without specifying the global
flag -g
, you are installing the module to your projects node_modules
folder. If that module has any runnable binaries, they will be added to node_modules/.bin
- so you should be able to run your local version of concurrently
by running node_modules/.bin/concurrently
(or from any folder in your project $(npm bin)/concurrently
). I personally prefer using the project's local dependencies over installing global ones so I have the option to use a different version in another project.
If you put a script into the package.json "scripts"
field it will reference these locally installed without having to specify the full path because npm run
adds your projects node_modules/.bin
to your path.
If you're having issues, I would start by checking the node_modules/.bin
folder and verifying that the binary for your script actually exists.
Solution 2
This issue also comes up when there is a dash "-" in your folder name. i.e. (/developer/api-movies) or even (/developer-apps/apiMovies. Use camelCase throughOut rather than dashes.
Asking
Updated on June 17, 2022Comments
-
Asking almost 2 years
I'm trying to run two scripts concurrently, and I found this package
concurrently
that supposedly would help me. I didnpm install concurrently --save
and it's listed in mypackage.json
. When I go to run it, however, it throws:concurrently: command not found
I don't understand why it can't find it despite being installed. I've set up the commands as shown here, so I know it can't be that. I've checked earlier instances of this issue, but it appears to be outdated. Is there another way I can check if this works, or should I try something else?
Screenshot:
-
Asking about 5 yearsIt worked using
sudo
. I tried it with without it and it said I had access denied.