3

i can find npm.cmd command prompt picenter image description herei have installed nodejs from nodejs website. when i typed

node -v

It gives me the version as

  6.11.2

But when i type

npm -v it doesnt gives me any results. I have done reinstalling nodejs several times.

my installation path is

C:\Program Files\nodejs

any help?

this is my git bash command prompt where you can see npm is not giving any result my environment variable after installing nodejs is that anything wrong?

22
  • I think it should be C:\Program Files\nodejs\bin. Try adding \bin Commented Aug 18, 2017 at 2:00
  • /bin to be added in environment varable? Commented Aug 18, 2017 at 2:01
  • added , same response as before. Commented Aug 18, 2017 at 2:04
  • Uninstall npm, then re-install it. Commented Aug 18, 2017 at 2:05
  • 1
    FYI, you can type which npm.* at a command prompt in windows 10 to see what is found on your path that matches that. It's possible you have a bogus npm.exe or npm.cmd that needs to be manually cleaned up. Commented Aug 18, 2017 at 2:14

2 Answers 2

3

Run command where npm in node.js cmd, you will get path where it referring.

Remove npm folder from C:\Users\dname\AppData\Roaming\npm

Sign up to request clarification or add additional context in comments.

Comments

-1

npm --version is the windows command line prompt

3 Comments

All these work just fine for me on Windows 10: npm -v, npm -version and npm --version with NPM v3.10.8. So, I don't think what you are proposing is necessarily required.
i am unable to install any npm package and also npm --version doesnt give me any result.
do you have a package.json file? if not you should run npm init in the command line to create the file; then npm install in the root of your application

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.