package.json: list of module needs for projectpackage-lock.json: same idea but with lock specific version that already works when runnpm ifrompackage.json
- Semantic Versioning (semver) has structure like: ^MAJOR.MINOR.PATCH
- With ^ when run
npm iit will install newest version of the same MAJOR. But with the newest MINOR or PATCH (install on new pc) could cause some issue or bug - The package-lock.json solves this by defining the MAJOR.MINOR.PATCH preciously that works.
package.json:npm ipackage-lock.json:npm ci