首页 > 其他分享 >npm下载灰常慢或者卡住的解决方法

npm下载灰常慢或者卡住的解决方法

时间:2022-11-16 17:00:20浏览次数:40  
标签:npm 卡住 registry https org 灰常慢 config 下载

原因可能是npm的下载地址是国外的,这时候可以将下载地址切换为国内的淘宝镜像,具体设置如下:

查看npm的下载地址:npm config get registry    没有设置的话就是https://registry.npmjs.org/

执行npm config set registry https://registry.npm.taobao.org 

如果方法一没有解决该问题,可以尝试使用npm cache clean --force清除缓存,并将安装失败的项目中的node_modules文件夹以及package-lock.json文件删除

标签:npm,卡住,registry,https,org,灰常慢,config,下载
From: https://www.cnblogs.com/angia/p/16896514.html

相关文章

  • 快速解决 npm 安装 node-sass 速度慢/错误的问题
     可通过配置淘宝的镜像源解决,首先配置淘宝的镜像源npmconfigsetregistryhttps://registry.npm.taobao.org然后在~/.npmrc加入下面内容sass_binary_site=https:/......
  • npm install提示request to https://registry.npmjs.org/vue-cli failed, reason: con
    错误如下npmERR!codeETIMEDOUTnpmERR!syscallconnectnpmERR!errnoETIMEDOUTnpmERR!networkrequesttohttps://registry.npmjs.org/vue-clifailed,reas......
  • node.js & npm version not match bug
    node.js&npmversionnotmatchbughttps://github.com/web-full-stack/nextjs-ssr/issues/7refs©xgqfrms2012-2020www.cnblogs.com/anonymous007发布文......
  • npm 基础操作
    构建项目npminit 根据提示填写内容,也可以一路回车使用默认值。为了省去上面的操作,我们加上 --yes 标志将自动使用默认值 npminit 填充所有选项:npminit--yesn......
  • node_modules/canvas npm ERR! command failed
    Installingpackages.Thismighttakeacoupleofminutes.Installingreact,react-dom,andreact-scriptswithcra-template-typescript...npmERR!code1npmERR!......
  • npm install 报错处理
    npminstall报错处理1.更新项目之后,npminstall之后    解决:1.删除node_modules2.删除package-lock.json3.清理一下缓存npmcacheclear--force4.重新......
  • npm 安装源设置
    npmconfigsetregistryhttps://registry.npm.taobao.org/#手动设置淘宝源npmconfiggetregistry//查看当前下载地址//nrm安装npminstall-gnrm//......
  • npm
    1、设置淘宝镜像源:npmconfigsetregistryhttps://registry.npmmirror.com/2、查看当前镜像源:npmconfiggetregistry3、设置官方镜像源:npmconfigsetreg......
  • 关于npm的----【全局安装vs局部安装】【开发依赖vs生产依赖】
    1、全局安装vs 局部安装全局安装:npmi<依赖>-g  (或-global)局部安装:npmi<依赖> 全局安装的好处:这个依赖很多项目都需要使用,并且所有项目需要的版本都一样......
  • yarn和npm
    两者都是包管理工具npm缺点:npminstall速度慢,可能会出现安装版本不一致出现bug,如果在安装过程中出现了错误,仍会继续安装下去,这就会导致错误信息被遮盖yarn优点:速......