We realized that npm install is actually doing two different things:
- Install dependencies from
package.json
- Add new dependencies to your project.
If you forget to --save a dependency, you even end up with something in your project that isn't actually part of your package.json.
Since Yarn was a completely new project we decided to rethink this approach and be more sensible. With Yarn:
yarn install will install your dependencies based on the lockfile or write a lockfile if none exists.
yarn add <package> will add a new dependency and add it to the lockfile and package.json file.
We do not support installing packages that won't be part of your manifest file.