首页 > 其他分享 >npm install 国内镜像 安装方式 快

npm install 国内镜像 安装方式 快

时间:2022-11-25 16:11:59浏览次数:58  
标签:npm install taobao registry https org 镜像

# 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 npm install --registry=https://registry.npm.taobao.org


https://segmentfault.com/a/1190000027083723  

如何正确使用淘宝npm镜像

安装一个依赖非常麻烦,这时才想到用淘宝镜像代理

临时使用

npm --registry https://registry.npm.taobao.org install express

永久使用

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

配置CNPM

这样的话,你用npm走的还是官方的,cnpm走的代理

npm install -g cnpm --registry=https://registry.npm.taobao.org

恢复使用

npm config set registry https://registry.npmjs.org

验证是否设置成功

 
npm info express
or
npm config get registry


https://segmentfault.com/a/1190000027083723

标签:npm,install,taobao,registry,https,org,镜像
From: https://www.cnblogs.com/porter/p/16925482.html

相关文章

  • 解决Centos7中docker无法从非官方库中pull镜像
    系统版本[root@bogon~]#cat/etc/redhat-release CentOSLinuxrelease7.1.1503(Core)  docker版本[root@bogon~]#docker--versionDockerversion1.7.1,build4......
  • Harbor用户机制、镜像同步和与K8s的集成实践
    Habor是由VMWare公司开源的容器镜像仓库。事实上,Habor是在DockerRegistry上进行了相应的企业级扩展,从而获得了更加广泛的应用,这些新的企业级特性包括:管理用户界面,基于角色......
  • apache install
    https://www.gnu.org/software/libtool/./configure--prefix=/usr/local/libtoolmakesudomakeinstall https://apr.apache.org/download.cgi./configure--prefix=......
  • npm安装antdpro出现npm ERR! ERESOLVE unable to resolve dependency tree
    npmi@ant-design/pro-cli-gprocreatemyapp?......
  • npx和npm
    npx是npm的高级版本,npx具有更强大的功能。用途在项目中直接运行指令,直接运行node_modules中的某个指令,不需要输入文件路径node-modules/.bin/babel.js--versionnp......
  • apt-get install 报错:E: Could not open lock file /var/lib/dpkg/lock-frontend - op
    直接在服务器敲:apt-getinstall xxxx遇到报错:E:Couldnotopenlockfile/var/lib/dpkg/lock-frontend-open(13:Permissiondenied)E:Unabletoacquirethe......
  • pyinstaller打包exe快速上手
    pyinstaller快速上手参考网址https://blog.csdn.net/NBDwo/article/details/115429859安装pipinstallpyinstaller参数说明(注意区分大小写)-i给应用程序......
  • elasticsearch镜像启动时报错
    报错:Errorresponsefromdaemon:OCIruntimecreatefailed:container_linux.go:380:startingcontainerprocesscaused:process_linux.go:545:containerinitcause......
  • npm does not support Node.js的解决办法
    1、查看npm和nodejs的版本是否配套。查看地址:​​以往的版本|Node.js​​2、如果还是不行,尝试切换镜像地址#强烈建议不要用直接使用cnpm安装,会有各种诡异的bug,可以通......
  • 升级NodeJs 和NPM
    今天准备调试一个NodeJS写的应用程序,结果怎么都不能 npmi 安装依赖; 报错信息:F:\GPA\heracles-master>npminpmWARNread-shrinkwrapThisversionofnpmisc......