当前位置:网站首页>package-lock. json
package-lock. json
2022-06-13 06:35:00 【Sindyue】
One 、 package-lock.json explain
package-lock.json When node_modules or package.json A file that is automatically generated when a change occurs . The main function of this file is to determine the dependencies of the currently installed package , So that the same dependency can be generated for subsequent reinstallations , Some of the dependencies that have occurred during the project development process are ignored .
Use npm install xxx Command to install the module , No longer need –save Options , It will automatically save the module dependency information to package.json file ;
Installation module operation ( change node_modules Folder contents ) Will generate or update package-lock.json file
Published modules will not contain package-lock.json file
If you change it manually package.json The module version already exists in the file , Direct execution npm install The newly specified version will not be installed , Only through npm install [email protected] to update
Reinstallation of the module is fast , Because package-lock.json The whole... Has been recorded in the document node_modules A tree structure of folders , Even the download address of the module is recorded , When reinstalling, you only need to download the file directly .
Two 、package.json and package-lock.json The difference between
package.json:
It is mainly used to define the packages that need to be depended on in the project
package-lock.json:
stay npm install Time to generate a document , It is used to record the actual installation in the current state npm package The specific source and version number of .
‘^’ :
Put before version number , Indicates backward compatible dependencies , To put it bluntly, when the large version number does not change , Download the latest version of the package
Package version numbers introduced in projects are often preceded by ^ Number , Every time npm install after , All downloaded packages will change , For the stability of the system , At the end of each execution npm install After that, it will generate package-lock file , This file records the specific version number of the last installation , So it provides a reference , In case of version compatibility problems , You can refer to this document to modify the version number .
边栏推荐
- 【新手上路常见问答】一步一步理解程序设计
- Intelligent digital asset management helps enterprises win the post epidemic Era
- Construction and verification of Alibaba cloud server webrtc system
- Recent problems
- Thread correlation point
- Failed to extract manifest from apk: processexception:%1 is not a valid Win32 Application.
- Super model logo online design and production tool
- Common websites and tools
- Comprehensive overview of ijkplayer contour features for ijkplayer code walk through
- MFS explanation (VI) -- MFS chunk server installation and configuration
猜你喜欢

MFS explanation (VI) -- MFS chunk server installation and configuration

SSM框架整合--->简单后台管理

Intelligent digital asset management helps enterprises win the post epidemic Era

Solutions to common problems in small program development
![[DP 01 backpack]](/img/be/1e5295684ead652eebfb72ab0be47a.jpg)
[DP 01 backpack]

JetPack - - -WorkManger

华为开发者认证与DevEco Studio编译器下载

Dart class inherits and implements mixed operators

Relationship between fragment lifecycle and activity
![[SketchUp 2021] CAD file import and modeling in the sketch master (establish elevation model in the sketch master by using CAD drawings), and the sketch master exports 2D, 3D and elevation effects of](/img/de/d0620a43c47a06d815c21ecb41a117.png)
[SketchUp 2021] CAD file import and modeling in the sketch master (establish elevation model in the sketch master by using CAD drawings), and the sketch master exports 2D, 3D and elevation effects of
随机推荐
The jadx decompiler can decompile jars and apks
[case] a super easy-to-use tool -- a calculator for programmers
Thread correlation point
JetPack - - -WorkManger
Jetpack - basic use of room
[JS] handwriting call(), apply(), bind()
‘ipconfig‘ 不是内部或外部命令,也不是可运行的程序 或批处理文件。
[JS] array flattening
[var const let differences]
IOError(Errors.E050.format(name=name))
Detailed explanation of scrcpy client code walk through H264 raw stream decoding process
Usegeneratedkeys=true configuration
[2022 college entrance examination season] what I want to say as a passer-by
【虚拟机】 VMware虚拟机占用空间过大解决
线程相关点
Echart histogram: stack histogram value formatted display
Detailed explanation of the player startup process of ijkplayer code walkthrough 2
端午安康,使用祝福话语生成词云吧
pthon 执行 pip 指令报错 You should consider upgrading via ...
Detailed explanation of the player startup process of ijkplayer code walk through