Vapid no longer working

I used vapid through my terminal yesterday and earlier today. Now when I open my terminal back up and type:
vapid start mysite

I get this response:
-bash: vapid: command not found

Based on what I read from another thread, I typed in: /usr/local/bin/ | grep vapid

And then: echo $PATH.

And got: /Users/aaron/.nvm/versions/node/v12.7.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin.

Did you happen to change node versions using NVM?

1 Like

No I didn’t change anything in between the time it was working and when I noticed it not working. But while I was debugging I did try to reinstall both node using NVM and Vapid. Node installed just fine but Vapid gave me errors.

I’m pretty new to this terminal stuff. I used Step 0 on this page to install. I used this when I first installed on Sunday and then again yesterday while I was trying to troubleshoot. https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/

I’m running Node v12.7.0

If it helps give you any clues, here’s what I get whenever I run npm install -g @vapid/cli

Still digging but honestly have no idea if the info I’m throwing up here is helpful or not so sorry if I’m muddying the waters.

In Users/aaron/.nvm/versions/node I have two versions listed. v10.16.1 and v12.7.0. In Users/aaron/.nvm/versions/node/v12.7.0/bin there’s an alias file for Vapid that doesn’t point to anything. When I open it, I get a message: “The operation can’t be completed because the original item for “vapid” can’t be found.”

But in Users/aaron/.nvm/versions/node/v10.16.1/bin there is also an alias for Vapid that does open. Does this indicate I should roll back to v10.16.1?

Okay, so I just removed the v12 version, effectively rolling back to v10. I am now able to use Vapid commands again. I’m actually having a similar problem trying to install Vapid on another computer with Node v12.8. Should I just install v10 on there as well?

Node v10 on my other computer resolved the issue. Thank you for nudging me in the right direction!

if you are running NVM, each node instance is isolated. So you can roll back without issues if a problem arises. So as soon as you install a different node version, you need to install all the packages for that version. Sorry I couldnt get back sooner, as I had a very similar issue when trying to update node and vapid on my production server

1 Like

Thanks for your help!