Skip to content

no duplicate meta tag but receive: conflicting amp tag "meta" with conflicting prop name="viewport" #7284

@oahehc

Description

@oahehc

Bug report

Describe the bug

Received this error without creating any viewport meta tag.
And also no duplicate meta tag at client side.
Found conflicting amp tag "meta" with conflicting prop name="viewport". https://err.sh/next.js/conflicting-amp-tag

To Reproduce

  1. start a new Next.js project
  2. create ./pages/index.js as below
    import { withAmp } from 'next/amp';
    
    export default withAmp(() => {
      return <div>withAmp test</div>
    });
    
  3. create ./pages/_document.js as below
    import React from 'react';
    import Document, { Html, Head, Main, NextScript } from 'next/document';
    
    export default class MyDocument extends Document {
      render() {
        return (
          <Html>
            <Head />
            <body>
              <Main />
              <NextScript />
            </body>
          </Html>
        );
      }
    }
    
  4. yarn dev
  5. received this error in the terminal
    Found conflicting amp tag "meta" with conflicting prop name="viewport". https://err.sh/next.js/conflicting-amp-tag

Expected behavior

no error in the terminal

System information

  • OS: macOS
  • Browser: chrome
  • Version of Next.js: 8.1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions