If package-lock.json exists, the results of the two installations may not be the same. Because cnpm install will not read the version information of dependent packages from package-lock.json.

For the difference between package.json and package-lock.json, see the articlenodejs package.json and package-lock.json

When we execute npm install, node will read the module name from the package.json file and get the version number from the package-lock.json file. And cnpm install will not go to pack-lock.json to get any information, it will only download the corresponding version of the package according to the configuration of each dependent package.

 

Related articles

kubernetes Deployment

【Automatic installation】 One: operating environment operating system centos7 firewall selinux #systemctl stop firewalld && systemctl disable firewalld

Deploying Nginx

How to install PostgreSQL Linux downloads (Red Hat family) Tip: The current version is Version 10.3 surroundings [root@h210 ~]# hostnamectl Static hostname: h210 Icon name: computer-vm

Lustre Deployment

kernel version information [root@CentOS1 ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) [root@CentOS1 ~]# uname -r 3.10.0-1062.el7.x86_64 Configure lustre installation source [root@CentOS1 lustre]# pwd /root/lustre [root@CentOS1 lustre]