Add react-dom
and react-router-dom
deps to the user's package.json
#2408
Labels
shouldfix
We should do/fix this at some point
Some users when installing deps e.g.
react-hot-toast
receive this error:Let's take a closer look:
peer react@">=16" from react-hot-toast@2.4.1
react-hot-toast
will be satisfied with any version of React above and including React 16.react@^18.2.0
in the user'spackage.json
npm
goes with that version.peer react-dom@">=16" from react-hot-toast@2.4.1
react-hot-toast
will be satisfied with any version of React DOM above and including React DOM 16.npm
goes for thelatest
version since we don't specifyreact-dom
in the user'spackage.json
file.latest
means React DOM 19 which then tries to pull React 19.A similar thing happened with React Router 7 being released, so we should also put
react-router-dom
dep in the user landpackage.json
.How to solve this
react-dom
andreact-router-dom
in the user'spackage.json
in all the templates.starters
templates Specify deps in pacakge.json explicitly starters#13basic
template (requires new Wasp release)package.json
validation rules in the next Wasp version to validate if users have these deps in theirpackage.json
for any users. that have an existing project.The text was updated successfully, but these errors were encountered: