page.tsx doesn't have a root layout error (even though it does)
Unanswered
Singapura posted this in #help-forum
SingapuraOP
In a previous post, I was told to delete the .next folder since the npm run dev command didn't work. It now works, but I get this error:
Even though I do have a root layout for every page
which is my layout.tsx file
Even though I do have a root layout for every page
which is my layout.tsx file
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import Link from 'next/link'
const inter = Inter({ subsets: ['latin'] })
export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body className={inter.className}>
<nav className="navBar">
<p id="icon" className='welcome'>Ergo</p>
<Link href='/'>Home</Link>
<Link href='/notes'>Notes</Link>
<Link href='/tasks'>Tasks</Link>
</nav>
{children}
</body>
</html>
)
}4 Replies
SingapuraOP
My folder configuration seems to be correct as well
Not sure what's happening, but I'd like to be able to run my website...
try again with the new stable #releases (i have seen many bugs fixed with it)
SingapuraOP
@riský it worked when I launched nextjs again today. visual studio must have been buggy...