MartinDuo
MartinDuo

Reputation: 753

How do I update my react dependencies after upgrading to react v16?

After upgrading to react v16, other dependencies are showing warnings when I use yarn:

warning "[email protected]" has incorrect peer dependency "react@^0.14 || ^15.0.0-rc || ^15.0".
warning "[email protected]" has incorrect peer dependency "react-dom@^0.14 || ^15.0.0-rc || ^15.0".
warning "[email protected]" has incorrect peer dependency "react@^0.14.9 || ^15.3.0".
warning "[email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0".
warning "[email protected]" has incorrect peer dependency "react@^15".
warning "[email protected]" has incorrect peer dependency "react@^15".
warning "[email protected]" has unmet peer dependency "fbjs@*".
warning "[email protected]" has incorrect peer dependency "react@^15.6.1".
warning "[email protected]" has incorrect peer dependency "react-dom@^15.6.1".
warning "[email protected]" has incorrect peer dependency "react-dom@^15.4.2".

How do I update these components? Do I have to manually use yarn to add the latest version for each one? Will that fix this? BTW, these warnings apparently have no effect on my app, it still compiles and runs.

Upvotes: 0

Views: 5770

Answers (3)

user8803663
user8803663

Reputation: 80

npm install -g npm-check-updates command will check and install it for you inside package.json

Upvotes: 0

Hossein
Hossein

Reputation: 4559

You can install npm-check-updates and run ncu -a in terminal.

Upvotes: 0

MEnf
MEnf

Reputation: 1512

run the command yarn upgrade in your terminal https://yarnpkg.com/lang/en/docs/cli/upgrade/

Upvotes: 1

Related Questions