--- title: 'Viewport `meta` tags should not be used in `_document.js` `
`' --- ## Why This Error Occurred Adding `` in `pages/_document.js` will lead to unexpected results since it cannot be deduped. The viewport tag should be handled by `next/head` in `pages/_app.js`. ## Possible Ways to Fix It Set your viewport `meta` tag in `pages/_app.js` instead: ```tsx filename="pages/_app.js" import Head from 'next/head' function MyApp({ Component, pageProps }) { return ( <>