2

I simply did a npm install -g @vue/cli and it didn't work. Trying a vue --version after doing the install gave me a bash command not found error.

I tried using sudo as well, but that didn't work. Tried uninstalling and reinstalling and that didn't work. Anyone got ideas for other things to look at?

Brian
  • 1,675
  • 3
  • 19
  • 29

1 Answers1

11

Turned out that the problem was the n node version manager which I had seen also interfere with other things. I wasn't really using it, so I uninstalled it.

sudo npm uninstall -g n

n was interfering with npm and npx themselves. They were not updating properly, but now with n gone, I updated them:

sudo npm install -g npm@latest

sudo npm install -g npx@latest

Then I installed the vue CLI

npm install -g @vue/cli@latest

After doing those commands I had the correct versions of npm and npx, and the vue CLI installed correctly as well.

Brian
  • 1,675
  • 3
  • 19
  • 29