当前位置:网站首页>Installation and use of cnpm
Installation and use of cnpm
2022-07-30 21:36:00 【bhegi_seg】
由于npmPackage managers can sometimes be unstable,It is easy to report errors when installing dependent packages,So there are Chinese developedcnpm,本人亲测,比npm稳定多了,速度还更快(Because it is a domestic source),This article will teach you a lessoncnpm如何安装,如何使用.
在安装cnpm之前,我们需要安装Node.js,使用npm安装cnpm.
什么是Node.js?
Node.js发布于2009年5月,由Ryan Dahl开发,是一个基于Chrome V8引擎的JavaScript运行环境,使用了一个事件驱动、非阻塞式I/O模型,让JavaScript 运行在服务端的开发平台,它让JavaScript成为与PHP、Python、Perl、Ruby等服务端语言平起平坐的脚本语言.
Node.js对一些特殊用例进行优化,提供替代的API,使得V8在非浏览器环境下运行得更好,V8引擎执行Javascript的速度非常快,性能非常好,基于Chrome JavaScript运行时建立的平台, 用于方便地搭建响应速度快、易于扩展的网络应用.
什么是npm?
NPM的全称是Node Package Manager,是一个NodeJS包管理和分发工具,已经成为了非官方的发布Node模块(包)的标准.
2020年3月17日,Github宣布收购npm,GitHub现在已经保证npm将永远免费.
什么是cnpm?
这是一个完整npmjs.org镜像,你可以用此代替官方版本(只读),同步频率目前为10分钟一次以保证尽量与官方服务同步.
- 当前npmmirror.com运行版本是: [email protected]
- 本系统运行在Node.js@v16.13.2上
- 开源镜像:CNPM Binaries Mirror
- Node.js 镜像:CNPM Binaries Mirror
- alinode 镜像:CNPM Binaries Mirror
- ChromeDriver 镜像:CNPM Binaries Mirror
- OperaDriver 镜像:CNPM Binaries Mirror
- Selenium 镜像:CNPM Binaries Mirror
- electron 镜像:CNPM Binaries Mirror
如何安装Node.js和npm?
参考这篇文章:Node.js的安装与使用(npm)_的博客-CSDN博客
如何安装cnpm?
The script below can be run directly,如果安装失败的话,加一下sudo试试:
npm install -g cnpm --registry=https://registry.npmmirror.com
Or you can add it directlynpm参数aliasa new command:
alias cnpm="npm --registry=https://registry.npmmirror.com
–cache= H O M E / . n p m / . c a c h e / c n p m − − d i s t u r l = h t t p s : / / n p m m i r r o r . c o m / m i r r o r s / n o d e − − u s e r c o n f i g = HOME/.npm/.cache/cnpm --disturl=https://npmmirror.com/mirrors/node --userconfig= HOME/.npm/.cache/cnpm−−disturl=https://npmmirror.com/mirrors/node−−userconfig=HOME/.cnpmrc"
# Or alias it in .bashrc or .zshrc
echo '
#alias for cnpm
alias cnpm="npm --registry=https://registry.npmmirror.com
–cache= H O M E / . n p m / . c a c h e / c n p m − − d i s t u r l = h t t p s : / / n p m m i r r o r . c o m / m i r r o r s / n o d e − − u s e r c o n f i g = HOME/.npm/.cache/cnpm --disturl=https://npmmirror.com/mirrors/node --userconfig= HOME/.npm/.cache/cnpm−−disturl=https://npmmirror.com/mirrors/node−−userconfig=HOME/.cnpmrc"’ >> ~/.zshrc && source ~/.zshrc
如何使用cnpm?
安装模块
cnpm install [name]
同步模块
直接通过synccommand to synchronize a module at once, 只有cnpmThis feature is only available on the command line:
cnpm sync express
当然, 你可以直接通过 web 方式来同步:/sync/express
open https://npmmirror.com/sync/express
其它命令
支持npm除了publish之外的所有命令, 如:
cnpm info express
以上就是我为大家带来的“cnpm的安装与使用”,If you like it, please support me with a like,谢谢!
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在.深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小.自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前.因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- 大家都在用的plm项目管理软件有哪些
- DPW-SDNet: Dual Pixel-Wavelet Domain Deep CNNsfor Soft Decoding of JPEG-Compressed Images
- 触摸屏状态机
- About the error of SFML Rect.inl file
- Image Restoration by Estimating Frequency Distribution of Local Patches
- 手动从0搭建ABP框架-ABP官方完整解决方案和手动搭建简化解决方案实践
- Typescript 严格模式有多严格?
- The reason for not using bs4 is that the name is too long?Crawl lottery lottery information
- 1064 Complete Binary Search Tree
- Teach you how to build a permanently running personal server
猜你喜欢

MYSQL JDBC图书管理系统

Image Restoration by Estimating Frequency Distribution of Local Patches

Google Earth Engine ——ee.List.sequence函数的使用

cmd(命令行)操作或连接mysql数据库,以及创建数据库与表

Advanced c language: pointers (5)

WinDbg实践--入门篇

MYSQL JDBC Book Management System

系统结构考点之并行主存

Why do so many people who teach themselves software testing give up later...

MySql创建数据表
随机推荐
mysql创建表
折叠旧版应用程序
MySQL Soul 16 Questions, How Many Questions Can You Last?
Day 16 of HCIP
基于ABP实现DDD--实体创建和更新
Apache DolphinScheduler新一代分布式工作流任务调度平台实战-
小心你的字典和样板代码
MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql
Teach you how to build a permanently running personal server
DistSQL 深度解析:打造动态化的分布式数据库
LeetCode·每日一题·952.按公因数计算最大组件大小·并查集
C语言犄角旮旯的知识之结构体
Redis数据更新,是先更新数据库还是先更新缓存?
go慢速入门——函数
不用bs4的原因居然是名字太长?爬取彩票开奖信息
Difference between cookie and session
MySQL 5.7详细下载安装配置教程
Outsourcing worked for three years, it was abolished...
【Network Security Column Directory】--Penguin Column Navigation
Google Earth Engine ——快速实现MODIS影像NDVI动画的在线加载并导出