Open
Description
Link to the code that reproduces this issue
https://github.com/GreedyWhale/nextjs-meta-bug
To Reproduce
- npx create-next-app@latest
√ What is your project named? ... my-app
√ Would you like to use TypeScript? ... No / Yes
√ Would you like to use ESLint? ... No / Yes
√ Would you like to use Tailwind CSS? ... No / Yes
√ Would you like your code inside a src/
directory? ... No / Yes
√ Would you like to use App Router? (recommended) ... No / Yes
√ Would you like to use Turbopack for next dev
? ... No / Yes
√ Would you like to customize the import alias (@/*
by default)? ... No / Yes
- create not-found.tsx file
import type { Metadata } from "next"
export const metadata: Metadata = {
title: 'My Blog',
description: '...',
robots: {
index: false,
follow: false
}
}
export default function NotFound() {
return (
<div>
<div>
<h2>Not Found</h2>
<p>Could not find requested resource</p>
</div>
</div>
)
}
- pnpm run dev
- Visit http://localhost:3000/xxxx
- Open your browser's debugging tool to view the html code
Current vs. Expected behavior
Hopefully there is only one <meta=“robots”> tag
Provide environment information
- package.json
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"react": "^19.0.0",
"react-dom": "^19.0.0",
"next": "15.1.8"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"eslint": "^9",
"eslint-config-next": "15.1.8",
"@eslint/eslintrc": "^3"
},
"packageManager": "[email protected]+sha256.79a98daa90248b50815e31460790f118c56fe099113370826caa0153be6daba5"
}
Which area(s) are affected? (Select all that apply)
Not sure
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels