-
Notifications
You must be signed in to change notification settings - Fork 75
Yarn
Jonathan Sharpe edited this page Feb 8, 2020
·
4 revisions
The starter kit is set up to use NPM, but you can switch over to Yarn if you'd prefer. Don't mix and match, this will cause confusion (e.g. Heroku will complain: Two different lockfiles found: package-lock.json and yarn.lock).
- Install Yarn
- Delete the
package-lock.jsonfile (and, if you'venpm installed already,node_modules/) - Add an entry in the
"engines"section of thepackage.lockfile to include the version of Yarn you're using e.g."yarn": "1.21.1"(especially if using Heroku, see Specifying a Yarn Version) - Run
yarnto install the dependencies and build theyarn.lockfile - Update the
scriptsobject inpackage.jsonto useyarninstead ofnpmto run commands, e.g. switch"prebuild": "npm run cleanup",to"prebuild": "yarn cleanup", -
[If using Travis] see Using yarn for the changes to make to
.travis.yml -
[If using Cloud Foundry] check in the buildpack releases that the version of Yarn you want to use matches the version available in the buildpack, which is specified in
manifest.yml - Commit and push all of your changes