Когда я тестирую компонент и пытаюсь его смонтировать, я получаю ошибку в заголовке. Когда я покопался в трассировке стека, я нашел результат в файле:
node_modules/@material-ui/core/Typography/Typography.js
и код в этом файле следующий:
var styles = function styles(theme) {
return {
root: {
margin: 0
},
body2: theme.typography.body2, //this line makes the exception
........
добавление конца трассировки стека:
at stytlesOrCreator (node_modules/@material-ui/core/Typography/Typography.js:34:29)
at Object.create (node_modules/@material-ui/styles/getStylesCreator/getStylesCreator.js:32:35)
at attach (node_modules/@material-ui/styles/makeStyles/makeStyles.js:113:32)
at func (node_modules/@material-ui/styles/makeStyles/makeStyles.js:258:7)