Element type is invalid: expected a string (for built-in components) or a class/function but got:nul

Uncaught Error: Invariant Violation: Element type is invalid: expected
a string (for built-in components) or a class/function but got:
undefined

出现以上报错,可能原因如下:

1、组件导入时,值为undefined,可能是因为太久没有更新node_modules包版本了,导致版本异常引起undefined
2、可能是因为导入方式搞错了,解构导入和默认导入没写对
Element type is invalid: expected a string (for built-in components) or a class/function but got:nul_第1张图片

你可能感兴趣的:(javascript,前端,开发语言)