当前位置:网站首页>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
边栏推荐
- Bond mode configuration
- Custom component -- data listener
- Blue Bridge Cup square filling number
- DHCP服务
- Create, traverse and search nodes as required for single linked list
- Results fill in the blanks for beer and drinks
- Understanding of C language EOF
- DOM Foundation
- Test interview questions collection (V) | automated testing and performance testing (with answers)
- [learning notes] linked list operation
猜你喜欢

Blue bridge code error ticket

LNMP搭建过程详解

Si Han talks about the professional development of testers

Custom components -- slots

Wechat applet custom compilation mode

Firewall - iptables firewall (four tables and five links, firewall configuration method, detailed explanation of matching rules)

raid磁盘阵列

Applet custom components - data, methods, and properties

三层交换和VRRP

Common models in software development
随机推荐
shell脚本——“三剑客”之awk命令
Installation and configuration of unit test framework jest with typescript
Test interview questions collection (I) | common required questions and procedures of software testing (with answers)
shell脚本——正则表达式
Results fill in the blank shopping list (teach you to solve it with Excel)
Teach you three steps to complete the construction of the test monitoring system hand in hand
NAT和PAT的原理及配置
[learning notes] tool
DNS正向解析实验
Ubuntu MySQL setting remote access permissions
DNS域名解析
Technology sharing | how to do Assertion Verification in interface automated testing?
How to describe a bug and the definition and life cycle of bug level
Build php7 private warehouse
Use powercli to create a custom esxi ISO image
Technology sharing | how to simulate real use scenarios? Mock technology to help you
Technology sharing | interface testing value and system
[learning notes] process creation
Esxi arm edition version 1.10 update
Results fill in the blank. How many days of national day are Sundays (solved by pure Excel)