我从React 15.4升级到了React 16.我还浏览了package.json中的所有js库并将它们更新到最新版本。我仍然收到这些警告,但不确定如何解决这些警告。
npm WARN react-render-html@0.5.2 requires a peer of react@^15.1.0 but none was installed.
npm WARN react-addons-test-utils@15.6.2 requires a peer of react-dom@^15.4.2 but none was installed.
npm WARN recharts@1.0.0-alpha.6 requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN @daptiv/ppm-npmp-react-theme@2.0.5 requires a peer of react@^15.6.1 but none was installed.
npm WARN react-resize-detector@0.6.0 requires a peer of react@^0.14.7 || ^15.0.0 but none was installed.
npm WARN react-smooth@0.3.0 requires a peer of react@^0.14.0 || ^15.0.0 but none was installed.
npm WARN react-smooth@0.3.0 requires a peer of react-dom@^0.14.0 || ^15.0.0 but none was installed.
npm WARN ppm-mspa-projectdashboard@0.0.23 No repository field.
有什么想法吗?
答案 0 :(得分:0)
关于这些警告,你无能为力。如果您查看那些您收到警告的依赖项的package.json
文件,例如react-render-html,您会看到它们将React 15作为对等依赖项。
您正在使用的这些软件包的作者必须将其依赖关系更新到最新的React以修复这些警告。
当然,您可以分叉项目并创建拉取请求,以便让它们更容易。