当前位置:网站首页>A pot of stew, a collection of common commands of NPM and yarn cnpm
A pot of stew, a collection of common commands of NPM and yarn cnpm
2022-07-07 19:39:00 【Milo_】
1. Configure the mirror
npmmirror China mirror station
npm config get registry // see npm Current mirror source
npm config set registryhttps://registry.npmmirror.com/ // Set up npm The image source is Taobao image
yarn config get registry // see yarn Current mirror source
yarn config set registry https://registry.npmmirror.com/ // Set up yarn The image source is Taobao image
2. Dependent installation
2.1 npm&cnpm
npm install xxx It is also abbreviated as npm i xxx This is the most common way to download , It will install the package in the current directory node_modelus in
npm install [email protected]1.x.x It can be accurately installed to a certain version
npm install --save xxx It is also abbreviated as npm install -s xxx This method will write the downloaded module information to package.json Medium dependencies In the list
npm install --save-dev xxx It is also abbreviated as npn install -D xxx This method will write the downloaded module information to package.json Medium devDependencies In the list Compared with the second method dependencies Is a runtime dependency , and devDependencies It's a development dependency . in other words , use --save-dev The installed package will not be used after we release it , Only used in development
npm install -g xxx The module will be installed to the global , That is, under the global path configured above
Use npm uninstall xxx or npm uninstall -g xxx Uninstallable module , If all uninstalls, use npm uninstall -all
2.2 yarn
yarn add package-name Installation package “ newest ” edition .
yarn add package-[email protected]1.2.3 Install a specific version of the package from the registry .
yarn add package-[email protected] Install specific “ label ”( for example beta、next or latest).
边栏推荐
- 转置卷积理论解释(输入输出大小分析)
- 2022.07.02
- 一张图深入的理解FP/FN/Precision/Recall
- Classification and application of enterprise MES Manufacturing Execution System
- Key points of anti reptile: identifying reptiles
- Policy mode - unity
- ES6 note 1
- 微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
- 2022.07.04
- R语言dplyr包select函数、group_by函数、filter函数和do函数获取dataframe中指定因子变量中指定水平中特定数值数据列的值第三大的值
猜你喜欢
Numpy——axis
杰理之相同声道的耳机不允许配对【篇】
Version 2.0 of tapdata, the open source live data platform, has been released
Kirin Xin'an won the bid for the new generation dispatching project of State Grid!
J ü rgen schmidhub reviews the 25th anniversary of LSTM papers: long short term memory All computable metaverses. Hierarchical reinforcement learning (RL). Meta-RL. Abstractions in generative adversar
PMP對工作有益嗎?怎麼選擇靠譜平臺讓備考更省心省力!!!
5billion, another master fund was born in Fujian
# 欢迎使用Markdown编辑器
【牛客网刷题系列 之 Verilog进阶挑战】~ 多bit MUX同步器
项目经理『面试八问』,看了等于会了
随机推荐
Kirin Xin'an with heterogeneous integration cloud financial information and innovation solutions appeared at the 15th Hunan Financial Technology Exchange Conference
First time in China! The language AI strength of this Chinese enterprise is recognized as No.2 in the world! Second only to Google
爬虫实战(七):爬王者英雄图片
Classification and application of enterprise MES Manufacturing Execution System
Experiment 1 of Compilation Principle: automatic implementation of lexical analyzer (Lex lexical analysis)
Is AI more fair than people in the distribution of wealth? Research on multiplayer game from deepmind
关于ssh登录时卡顿30s左右的问题调试处理
[Base64 notes] [suggestions collection]
POJ 2392 Space Elevator
从39个kaggle竞赛中总结出来的图像分割的Tips和Tricks
索引总结(突击版本)
L1-027 rental (Lua)
PMP每日一练 | 考试不迷路-7.7
LeetCode 497(C#)
For friends who are not fat at all, nature tells you the reason: it is a genetic mutation
Unable to link the remote redis server (solution 100%
L1-028 judging prime number (Lua)
Solve the error reporting problem of rosdep
what‘s the meaning of inference
Draw squares with Obama (Lua)