【问题标题】:npm WARN .. requires a peer of react@^16.4.0 but none is installednpm WARN .. 需要 react@^16.4.0 的对等点,但没有安装
【发布时间】:2018-12-03 15:41:04
【问题描述】:

我尝试运行从 github 下载的项目。但是,在 npm install 期间,显示了以下警告。npm WARN axui-datagrid@0.5.0 requires a peer of react@^16.4.0 but none is installed. You must install peer dependecies yourself.

我忽略了这个警告并运行了一次 npm start,但出现了以下错误。我该如何解决?

internal/modules/cjs/loader.js:582   throws err;
                                     ^
Error: Cannot find module 'react-scripts-ts/package.json'
npm Error! Failed at the axui-datagrid@0.3.20 start: 'react-app-rewired start --scripts-version react-scripts-ts

【问题讨论】:

  • 没有人会点击链接来确定它们是否相关。您应该包含错误的文本。
  • 我记下了错误。请检查。

标签: node.js reactjs npm


【解决方案1】:

您的应用程序需要有react installed,因为 axui-datagrid 依赖于反应:

npm install react react-dom

axui-datagrid example usage application 表示 react in use。

【讨论】:

    猜你喜欢
    • 2017-04-01
    • 2016-03-09
    • 2019-06-03
    • 2017-04-09
    • 2017-12-18
    • 2017-09-10
    • 2018-02-13
    • 2019-02-20
    • 2019-02-12
    相关资源
    最近更新 更多