3

there are a lot of people here asking the same question and I tried almost all the answers but nothing worked for me ..

The problem is , I can't run any npm command, I installed node js from the windows installer here , and when I write any npm command for example: "npm install" or "npm start" nothing happens, I tried reinstalling and removing paths from environment variables but no luck..

I also tried Upgrading npm on Windows from this link , when I write this command

npm install --global --production npm-windows-upgrade

nothing happens , just like any other npm commands.. I tried also fixing this issue by what was written in the same page here but no luck also :(

What seems to be the problem guys ? thank you so much

Those are the paths that I have in environment variables now:

user variables path: C:\Users\{username}\AppData\Roaming\npm
system variables path: C:\Program Files\nodejs\
6
  • What does 'nothing happens' mean? No error message at all? Has the folder that npm has been installed to not been added to the path? Commented Jul 20, 2016 at 10:10
  • no error message , no lines , nothing at all :) .. the path has been added to the path Commented Jul 20, 2016 at 10:11
  • Does npm -v work? Commented Jul 20, 2016 at 10:14
  • No npm -v doesn't work, but node -v works fine , it gives me this v4.4.7 Commented Jul 20, 2016 at 10:17
  • OK, all I can see by way of suggestions is uninstalling node, deleting the contents of all the user folders etc. and re-installing. Sorry! :( Commented Jul 20, 2016 at 10:19

2 Answers 2

2

In my case it was a problem with a wrong path to a certificate.

My fix:

  1. Open "%USERPROFILE%/.npmrc" file
  2. Delete the line with the wrong path to the certificate
Sign up to request clarification or add additional context in comments.

2 Comments

I found your answer after literal hours of googling and this was exactly what went wrong in mine.
this work for me. Thanks
1

It turned out that there was an old version of Node.js installed on this PC before.

So to solve this problem I had t reinstall and uninstall several versions of Node.js from here until one of then worked..

This helped me

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.