Skip to content

Package Managers

Out of the box, NodeJS gives us access to npm to handle packages.

npm is very similar to composer in that it will manage project dependencies and maintain the state of the dependencies in the project. Instead of composer.json and composer.lock, we have package.json and a lock file.

There are two options for managing dependencies on the command line * npm * yarn

We are going to assume that yarn is being used to handle dependencies for projects moving forward.

Yarn

Installation

Yarn works with the package.json file the same as npm but uses a different lock file yarn.lock

See the usage guide for how to use Yarn.