npm gets stuck on fetchMetadata -> network

前端 未结 11 1746
栀梦
栀梦 2020-12-24 04:32

My npm is getting stuck a lot, whether its npm install from package.json or individual packages.

Right now, I\'m not even able to sudo npm install

11条回答
  •  一整个雨季
    2020-12-24 05:17

    For me it was double temp directories in Windows.

    Open a command prompt and type:

    echo %TEMP%
    

    You should receive path to a single directory. If you receive multiple directories (I received C:\Users\\AppData\Local\Temp;C:\xampp\php) this might be the problem. You can fix it using this command:

    SET TEMP=""
    

    where might be the first path (before semicolon, that means C:\Users\\AppData\Local\Temp in my case).

提交回复
热议问题