React-hot-loader: @types/react peer dependency causes npm/yarn warnings

Created on 29 Apr 2020  路  6Comments  路  Source: gaearon/react-hot-loader

Description

We don't use TypeScript in our project and after updating to the latest react-hot-loader version we started getting the following warning during the dependencies installation:

warning " > [email protected]" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0".

Please consider removing this package from the peer dependencies because not all the projects use TypeScript

Environment

React Hot Loader version: 4.12.19

Run these commands in the project folder and fill in their results:

  1. node -v: v13.12.0
  2. npm -v: 6.14.4

Then, specify:

  1. Operating system: MacOS
  2. Browser and version: Chrome 80

Reproducible Demo

npm init --yes && npm i react react-dom react-hot-loader

Most helpful comment

v4.12.21 released

All 6 comments

Maybe the field peerDependenciesMeta can be added to package.json, so the dependency may be made optional.

With this, if the dependency is found on the project, versions will be compared, but no warning will be thrown if not installed.

It was added a while ago

馃槄but the new package version was not released

v4.12.21 released

Thank you for the quick response! The warning is gone after updating to v4.12.21.

Nice. Thank you for the update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

theKashey picture theKashey  路  4Comments

ghost picture ghost  路  3Comments

zlk89 picture zlk89  路  3Comments

rockchalkwushock picture rockchalkwushock  路  3Comments

JamesIves picture JamesIves  路  4Comments