当前位置:网站首页>Differences and relationships among NPM, Yran and NPX
Differences and relationships among NPM, Yran and NPX
2022-07-28 07:04:00 【SheepOnTheCloud】
| difference | npm | yran | |
| Installation mode | You need to wait for the end of the previous installation task before executing the next | Perform multiple installation tasks at the same time | |
| Offline installation | Download again from the network | If the package has been installed , Will take priority from it | |
| edition | Download the latest and most stable from the network by default , Version locking can be achieved through commands | There is one by default yarn.lock File lock version , Make sure the environment is unified | |
| Install the output | Output information redundancy | Output less information | |
| Download and install | stay node.js Recommended on the official website LTS ( Long term support ) edition | npm install -g yarn | |
| View version | Command line node -v see node Installation version of . incidentally npm -v see npm Version number of . | yarn --version |
summary
1,npm Slow download speed , Even if it's new install Yes, the speed is still slow ,yarn Be quick
2,npm The packages installed by the same project cannot be consistent ,yarn Version lock
3,npm When downloading multiple packages, the download error of a single package will be thrown out and continue to download the next package ,yran Intuitive print installation information
npx?
npx yes npm Advanced version of , With more powerful functions
- Run instructions directly in the project , Direct operation node_modules An instruction in , There is no need to enter the file path
node-modules/.bin/babel.js --version npx babel --version - Avoid global installation of modules :npx Temporarily install a module , Delete this module after use ( The following two modules do not need to be installed globally )
npx babel my-react-app npx [email protected] main.js -o ./dist/main.js - Use different versions of commands , Use local or downloaded commands
npx --no-install http-server # Must use local http-server( If there is no local error report ) npx --ignore-existing create-react-app my-react-app # Ignore locally installed packages , Directly use the downloaded package npx [email protected] -v # Commands for using a specific version of the packageParameters
- -p After downloading a module , Run the command ( The command must be downloaded , Similar to channel character )
npx -p [email protected] node -v npx -p A -p B [command]github
- You can execute the code in the warehouse , The remote code must be a module , That is, it must contain
package.jsonAnd entry scriptsnpx github:piuccio/cowsay hello
边栏推荐
- Animation animation realizes the crossing (click) pause
- About gcc:multiple definition of
- Cocos2d-x learning notes Tile Map tiledmap
- Canvas drawing 1
- Test interview questions collection (V) | automated testing and performance testing (with answers)
- Technology sharing | interface testing value and system
- [learning notes] coding ability
- MySQL build database Series (I) -- download MySQL
- Common models in software development
- Hdu-5783 divide the sequence (greedy water question)
猜你喜欢

Esxi arm edition version 1.10 update

PXE unattended installation management

静态和浮动路由

1、 PXE overview and installation

MOOC翁恺 C语言 第三周:判断与循环:2.循环

MySQL build database Series (I) -- download MySQL

DHCP principle and configuration

Applets: lifecycle

Shell script - sort, uniq, TR, array sort, cut, Eval command configuration

DNS域名解析
随机推荐
On cookies and session
MOOC Weng Kai C language week 7: array operation: 1. array operation 2. Search 3. preliminary sorting
Common models in software development
Wechat applet custom compilation mode
DNS域名解析
NAT和PAT的原理及配置
Technology sharing | send requests using postman
防火墙——iptables防火墙(四表五链、防火墙配置方法、匹配规则详解)
Es6--- > arrow function, class, modularization
Hdu-1097-a hard puzzle (fast power)
一、PXE概述和安装
Custom components -- styles
What is a linear table?
Technology sharing | sending requests using curl
NAT-网络地址转换
MOOC Weng Kai C language week 3: judgment and circulation: 2. circulation
Ubuntu18.04+centos7 configure redis master-slave [learning notes]
FTP服务
MOOC Weng Kai C language fourth week: further judgment and circulation: 1. Logical types and operations 2. Judgment of cascading and nesting
Result fill in the blank (dfs*c language)