最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - npm command does not show any output or result - Stack Overflow

programmeradmin2浏览0评论

npm -v not giving any output

Please see the attached image. I have installed node js. After open my git bash, if i run node -v, its give me node version but after i write npm -v, i have passed a long time, like more than 30 minute. it is giving me any output. no error or no warning, nothing. just stay like my attached image. Here is the mand also-

shamim@DESKTOP-3C7P5TO MINGW64 /e/wamp64/www/vuejspractice/vue-cli-dev
$ node -v
v8.9.4

shamim@DESKTOP-3C7P5TO MINGW64 /e/wamp64/www/vuejspractice/vue-cli-dev
$ npm -v

Same result when i run this also

npm install

Passed after a long time more than 30 minutes. nothing happen.

Please someone give me a solution.

npm -v not giving any output

Please see the attached image. I have installed node js. After open my git bash, if i run node -v, its give me node version but after i write npm -v, i have passed a long time, like more than 30 minute. it is giving me any output. no error or no warning, nothing. just stay like my attached image. Here is the mand also-

shamim@DESKTOP-3C7P5TO MINGW64 /e/wamp64/www/vuejspractice/vue-cli-dev
$ node -v
v8.9.4

shamim@DESKTOP-3C7P5TO MINGW64 /e/wamp64/www/vuejspractice/vue-cli-dev
$ npm -v

Same result when i run this also

npm install

Passed after a long time more than 30 minutes. nothing happen.

Please someone give me a solution.

Share Improve this question edited Feb 7, 2018 at 6:22 Dathan 4,5934 gold badges27 silver badges46 bronze badges asked Feb 6, 2018 at 23:09 Shamim SdrShamim Sdr 1211 gold badge4 silver badges13 bronze badges 2
  • Did you try updating your npm ? How did you install node ? – Ashish Pandey Commented Feb 7, 2018 at 2:25
  • i have downloaded node from their official website. then install it to my C driver. – Shamim Sdr Commented Feb 7, 2018 at 13:40
Add a ment  | 

3 Answers 3

Reset to default 2

I had the same problem, any mand that starts with npm just hangs. Apparently I accidentally set up the wrong prefix in my npm. The way I solved it:

  1. go to your folder directory (e.g. C:/USER/)
  2. ls -al
  3. .npmrc folder would appear in your directory and open it in any editor
  4. change your prefix back to what it was.

voila, it's back to what it was again.

I was also facing the same issue. Later on I find out I set the npm config registry to local one, which was not getting connected.

So I used npm config delete registry

After this it was working fine

Try to run npm init first then carry on with enter to skip the questions, make sure you have a package.json file then try running npm -v

发布评论

评论列表(0)

  1. 暂无评论