• package.json:
    • It is used for installing packages in a Node.js project.
    • It is not just for installing the dependencies but also for other purposes like defining project properties, description, author & license information, scripts to run via npm, etc.
    • It keeps the minimum version an application needs.
    • Updating packages using npm install will update changes related to package information in package-lock.json and not in package.json.

  • package-lock.json:
    • It is solely used for locking dependencies to a specific version.
    • It keeps the exact version of the installed packages so that we can re-install those packages with exact same versions.

Comments

Popular posts from this blog