当前位置:网站首页>Node package depends on download management
Node package depends on download management
2022-07-27 17:01:00 【sl105105】
Search the folder cmd Press enter to call up node Command prompt

Check for installation Input node -v
The version number appears v16.... Description installation successful

Create a json package , Input npm init

The fastest way is to enter npm init -y Enter to Is this OK?
Download the latest js Packet dependency , Input npm install jquery, Download the reference installation package , Finally, the packaged files are dist In the folder

There are three ways to download the version , It can solve the problems encountered in work
The first one is :npm install Download package depends on
Notice that we npm install( Abbreviation :npm i) When the installation package depends ,^ The up arrow will automatically upgrade the small version , Will be able to 3.5.0 Upgrade package dependency to 3.6.0, As a result, it is not supported in the project

resolvent : Install the version you want , Then don't add ^ up arrow , Because of the addition of ^ up arrow , Will automatically help you upgrade to the latest version . Remember that !!!
The second kind :npm i [email protected] Version number
Then download it jquery Appoint Version number of , You can input npm i [email protected] Version number , You can download the version number

The third kind of :npm i [email protected]
There is another case where you don't know the specific sub version you want to download , Only know the main version , You can input npm i [email protected] Download the latest content of the latest large version

Get to know jquery How are the version numbers of
Illustrate with examples : v3.6.0
3: Represents the main version There are big differences between large versions , Generally, it is a major update
6: Represents the next version Compatible with new features
0: Represents revision number Compatibility correction

Two environments for development
The first one is : The production environment is used for the official launch of the project Enter the command
example :npm i [email protected] or npm i bootstrap --save or npm i vue -S

The second kind : You can enter commands for the dependencies needed by the development environment
packages.json The following content will appear in , Representing the development environment requires package dependencies
example :npm i moment --save-dev or npm i vue -D or npm i moment -D

Environmental reasons :
Finally, we need to package the project , To improve performance , Generally, only the development environment is packaged , Save performance , And if the production environment has been downloaded , Note that the development environment is downloaded at this time , The dependent packages in the production environment will disappear , There is only a development environment , But it does not affect our use .
Uninstall dependency package :
Input :npm uninstall jquery( Abbreviation :npm unijquery)

边栏推荐
- Great Cells & Counting Grids
- Apache
- 每条你收藏的资讯背后,都离不开TA
- Jerry's built-in touch parameters for modification [chapter]
- Gurobi——GRBModel
- 京东张政:内容理解在广告场景下的实践和探索
- Layoff quarrel, musk: I'm too hard; Mercilessly open source a public opinion acquisition project; Feature engineering is as simple as parameter adjustment?! Nerf boss shouted that he couldn't move; Cu
- Jerry's book can't find Bluetooth solutions [article]
- D3.js create a cool arc
- AS更换背景主题以及背景图片
猜你喜欢
随机推荐
Apache
Start from scratch blazor server (1) -- project construction
String numeric type converted to thousands
Unity 入门
UML图介绍
File class byte input and output stream
Natural sorting: comparable interface, customized sorting: the difference between comparator interface
node包依赖下载管理
Mobile end Foundation
meta-data 占位符的引用
数据库基础
D3.js create a cool arc
Gurobi——GRBLinExpr
万字剖析Ribbon核心组件以及运行原理
字符流读取文件
2021-06-18 SSM项目中自动装配错误
内置对象(下)
Circular statements and arrays
从零开始Blazor Server(1)--项目搭建
C语言之指针初级








