You should never, ever "gitignore" your lock files(package-lock.json and/or yarn.lock)! Even when installing using npm install, it generates a notice that we "should commit this file". The lock files are used to "lock" the versions of the dependencies used in the project and also of the dependencies used by the top-level packages.
You should never, ever "gitignore" your
lock
files(package-lock.json
and/oryarn.lock
)! Even when installing usingnpm install
, it generates a notice that we "should commit this file". The lock files are used to "lock" the versions of the dependencies used in the project and also of the dependencies used by the top-level packages.Thanks a lot I will remember it 😄