我正在使用大量的React代码重构一个大型的Meteor项目。移动代码后,我收到此错误:
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
at invariant (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:13823:15)
at ReactCompositeComponentWrapper.instantiateReactComponent [as _instantiateReactComponent] (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:28480:56)
at ReactCompositeComponentWrapper.performInitialMount (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:28908:22)
at ReactCompositeComponentWrapper.mountComponent (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:28799:21)
at Object.mountComponent (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:21654:35)
at Object.obj.(anonymous function) [as mountComponent] (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/backend.js:8598:20)
at mountComponentIntoNode (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:33765:32)
at ReactReconcileTransaction.perform (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:22605:20)
at batchedMountComponentIntoNode (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:33787:15)
at ReactDefaultBatchingStrategyTransaction.perform (http://localhost:3000/packages/modules.js?hash=97484ff32aea5009d2055c2b506696595ed18f39:22605:20)
现在我确定这是由于缺少导出/错误导入语句。 但问题是......在哪里?控制台日志中没有任何内容有助于确定我需要查看的位置。所有链接都指向框架代码。
有什么建议吗?