Vapid: command not found right after installation


I uninstalled vapid-cli globally and re-installed it. Now it won’t recognize the vapid command.

Seems like it was able to install the packages successfully but when I run vapid new path/to/folder it doesn’t recognize the command.

MacOS 10.14.1
NPM v6.4.1
Node v10.13.0

Install not working

did you try to open a new terminal instance, or to run source ~/.bash_profile or source ~/.profile to refresh your $PATH and load the newly installed commands?

Also, can you run ls /usr/local/bin/ | grep vapid and see if it returns anything?
If it does, please paste the output of echo $PATH.


I ran ls /usr/local/bin/ | grep vapid but it didn’t return anything.

I opened a new terminal instance, ran source ~/.proflie and vapid command seems to work after that.

Now, if I open a new terminal instance, I had to run source ~/.proflie again to make vapid work. Is there a way to automatically run source ~/.profile right away?


@aprilapple Do you also have a .bash_profile file in your home directory?


This is not really a vapid issue. You can find more information about .bashrc and .profile on stackoverfow:


Thank you so for the resource @walidvb I got it working now. @scott there’s a .bash_profile already in place.


@aprilapple Glad to hear it’s working now. Feel free to reach out if you run into any other troubles.


Apologies in advance, this config stuff gets me messed up.

I’m having the same issue but am not able to resolve it with the info here. I’ve run source /.bash_profile and doesn’t seem to have any effect.

I have it working on my iMac but not macbook. Not sure what difference would be causing this. My .bash_profiles are identical on both machines.

/usr/local/bin/ | grep vapid returns ‘vapid’ on my macbook (the one not working) but returns ‘/usr/local/bin/: is a directory’ on the imac (working one).

Any input that could help debug would be appreciated.


Try this command:

which vapid

I suspect it will return the location of vapid on your iMac, but not on your MacBook. If that’s the case, then try looking in the same location on your MacBook (e.g., cd /path/to/imac/vapid), and see if the program is there. If so, it may just be a matter of modifying your PATH, so your MacBook knows where to find it.


The path on iMac is /usr/local/bin/vapid

You’re right, which vapid doesn’t return on macbook, but when I go to /usr/local/bin on my macbook and ls, it lists vapid. However when I do open vapid or cd it says /usr/local/bin/vapid doesn’t exist.

I have homebrew installed on both machines, but maybe a setting there is different. To test, I went ahead and updated npm. I noticed the path is slightly different. It looks like it’s throwing things in Homebrew’s Cellar on macbook, but right in usr/local/bin on iMac.

/usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
/usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js

/usr/local/Cellar/node/11.6.0/bin/npm -> /usr/local/Cellar/node/11.6.0/lib/node_modules/npm/bin/npm-cli.js
/usr/local/Cellar/node/11.6.0/bin/npx -> /usr/local/Cellar/node/11.6.0/lib/node_modules/npm/bin/npx-cli.js

I’m not sure how to reset this (a homebrew setting?). Sorry for the confusion I’m just very inexperienced with package management stuff. Is it easiest to just reset my macbook to match iMac?

Thanks again


Got it working!

Had to update my npm prefix to use the same path rather than homebrew. I guess that was causing conflicts.

Thanks for your time.


@mwilliams1188 Glad to hear you got it working, and thanks for posting your solution here.