【问题标题】:javascript error when performing npm start in react-virtualized在 react-virtualized 中执行 npm start 时出现 javascript 错误
【发布时间】:2017-03-14 09:36:37
【问题描述】:

我正在尝试测试 react-virtualized。我使用了 download-zip 文件。 当我在 react-virtualized-master 中运行 npm start 时, 它不会呈现任何具有以下错误的内容。 任何人都可以帮助修复这个错误吗?

反应错误:

Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `Application`.
    at invariant (invariant.js:44)
    at ReactCompositeComponentWrapper.instantiateReactComponent [as _instantiateReactComponent] (instantiateReactComponent.js:86)
    at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:388)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:262)
    at Object.mountComponent (ReactReconciler.js:47)
    at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:397)
    at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:262)
    at Object.mountComponent (ReactReconciler.js:47)
    at mountComponentIntoNode (ReactMount.js:105)
    at ReactReconcileTransaction.perform (Transaction.js:138)

【问题讨论】:

    标签: react-virtualized


    【解决方案1】:

    我不知道什么是“react-virtualized-master”。你说的是 react-virtualized git 仓库的 master 分支吗?

    我从您复制的错误消息中猜测是安装了错误版本的 React (PureComponent。如果您正在运行 react-virtualized repo,则不应出现这种情况,但应使用 16.0 alpha。

    说实话,可能需要更多信息来帮助解决这个问题。

    【讨论】:

      猜你喜欢
      • 2020-05-04
      • 1970-01-01
      • 2019-05-07
      • 2021-09-07
      • 2023-01-11
      • 2021-10-17
      • 2020-07-02
      • 2021-01-01
      • 1970-01-01
      相关资源
      最近更新 更多