1.  Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports

这个错误,最常见的问题是import组件出错。例如,

import { com } from 't-com'  
//写成了  
import com from 't-com'

或者

import com from 't-com'  
//写成了  
import { com } from 't-com'

 2. JSON.parse()报错 Unexpected token o in JSON at position 1

错误原因

1. 后端返回数据类型错误,前端解析报错,查看接口返回数据来排除

2. 本地存储中存在非法字符,使用隐身模式chrome窗口来排除

3. JSON.parse将一个非法的值或已经是Object的值二次parse

3. react-dom.js:103 Error: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings

大概率是组件render中某个组件,import到的组件为空。原因是文件中没有组件,或者该组件没有被webpack编译

相关文章:

  • 2022-02-06
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
  • 2022-02-07
  • 2021-12-10
猜你喜欢
  • 2022-03-08
  • 2021-08-07
  • 2021-09-12
  • 2022-02-14
  • 2021-12-02
  • 2022-02-26
  • 2021-07-02
相关资源
相似解决方案