Have done a lot of googling, tried reinstalling node.js using the official installer, but my npm pathing still doesn\'t work.
This doesn\'t work
npm
I did this in Windows 10,
c:\programfiles\nodejs\node_modules\npm\bin
Now you can write your command in prompt or powershell.
If you using WIndows 10, go for powershell its a rich UI
get the path from npm:
npm config get prefix
and just as a future reference, this is the path I added in Windows 10:
C:\Users\{yourName}\AppData\Roaming\npm
If you want to add it for all users just add the following path [by @glenn-lawrence from the comments]:
%AppData%\npm
If you can't work with npm packages, you propably has bad config with npm install packages, you try this:
Run the following command in your terminal to revert back to the default registry
npm config set registry https://registry.npmjs.org/
https://docs.npmjs.com/misc/config#registry
You need to Add C:\Program Files\nodejs
to your PATH environment variable. To do this follow these steps:
C:\Program Files\nodejs
. Make sure it is separated from any other paths by a ;
.You will have to restart any currently-opened command prompts before it will take effect.
I have used the cmdlet and navigate to the path you want to switch your npm files to. Type in npm root -g to see what the current path your npm is installed to. Next use npm config set prefix and your npm path will be changed to whatever directory you are currently on.
I may be a total noob but I had no clue I had to install npm-cli first. I had just assumed I already had it.
npm install --global vue-cli