ark
ark copied to clipboard
Missing component: <Html />
Not sure if there are one or two issues here :-
event - compiled successfully
Material-UI: the createMuiTheme function was renamed to createTheme.
You should use `import { createTheme } from '@material-ui/core/styles'`
Warning: viewport meta tags should not be used in _document.js's <Head>. https://err.sh/next.js/no-document-viewport-meta
warn - Your custom Document (pages/_document) did not render all the required subcomponent.
Missing component: <Html />
Read how to fix here: https://err.sh/next.js/missing-document-component
I fix the problem add this
import React from 'react'; import Document, { Html, Head, Main, NextScript } from 'next/document'; import { ServerStyleSheets } from '@material-ui/styles';
class MyDocument extends Document { render() { return (
<body>
<Html />
<Head />
<Main />
<NextScript />
</body>
</html>
);
} }