npm install does nothing - how make it work?

前端 未结 5 1592
萌比男神i
萌比男神i 2021-01-17 15:07

I have a trouble with npm and I haven\'t found solution in web.

Today I wanted to start my adventure with nodejs, npm, bower etc.

I use Windows 8.1.

相关标签:
5条回答
  • 2021-01-17 15:32

    I had some issues with the npm install bower -g aswell but try this command:

    npm install bower --global
    

    this one worked for me

    0 讨论(0)
  • 2021-01-17 15:45

    I was getting the same error. But I found that this was Windows Firewall problem.

    Make sure your firewall is not preventing any Incoming connections or there is no limit on TCP connections.

    0 讨论(0)
  • 2021-01-17 15:49

    Thetoast found solution that worked for me.

    If you have the same problem check the value of your TEMP environment variable. To do so run nodejs' command window and type

    echo %TEMP%
    

    You should receive path to a single directory. If you receive multiple directory (as I did - I received C:\Users\<user>\AppData\Local\Temp;c:\Users\<user>\AppData\Local\Atlassian\SourceTree\git_local\bin\) it means that this might by the cause of the problem. You can fix it by typing

    SET TEMP=<correct path to temporary directory>
    

    where <correct path to temporary directory> might by the first path (before semicolon, that means C:\Users\<user>\AppData\Local\Temp in my case).

    0 讨论(0)
  • 2021-01-17 15:49

    Just adding another solution if it helps someone - I had this issue after cloning a repo and found blowing away node_modules worked for me.

    rm -rf node_modules
    
    0 讨论(0)
  • 2021-01-17 15:52

    I know this is an old question but i am adding this answer just for the record.

    I was facing a similar issue i.e. rotating character with no progress in actual installation after trying to install using the following command on linux Mint 17(from http://bower.io/#install-bower):

    npm install -g bower
    

    The command which actually worked for me is:

    npm install --global bower
    

    Note: You will need root/administrative privelage to run this command. So you might wanna use sudo.

    0 讨论(0)
提交回复
热议问题