Yarn - How do I update each dependency in package.json to the latest version?
yarn upgrade-interactive --latest
But you have to have a yarn.lock
file before do it. If you are using npm
, you must delete package-lock.json
first. Then run yarn
to create structure. After that you can do upgrade-interactive
. Without that, yarn
shows upgrade, but no changes and effects in package.json
.
You can try this npm package yarn-upgrade-all
. This package will remove every package in package.json
and add it again which will update it to latest version.
installation:
npm install -g yarn-upgrade-all
usage:in your project directory run:
yarn yarn-upgrade-all