Need Help Resolving [Error: UNKNOWN: unknown, errno: -4094,
Answered
Collared Plover posted this in #help-forum
Collared PloverOP
Hi everyone,
I’m currently facing an issue with my Next.js project, and I’m hoping someone can help me out. I keep getting the following error:
I’m currently facing an issue with my Next.js project, and I’m hoping someone can help me out. I keep getting the following error:
[Error: UNKNOWN: unknown error, open 'C:\restaurant4\.next\static\chunks\app\layout.js']
{
errno: -4094,
code: 'UNKNOWN',
syscall: 'open',
path: 'C:\\restaurant4\\.next\\static\\chunks\\app\\layout.js'
}19 Replies
Collared PloverOP
@Anay-208
Netherland Dwarf
Can you show your layout
Collared PloverOP
@Netherland Dwarf
import type { Metadata } from "next";
import localFont from "next/font/local";
import "./globals.css";
import Header from "./ui/Header";
import Footer from "./components/Footer";
import { auth } from "@/auth";
import { SessionProvider } from "next-auth/react";
import { Toaster } from "@/components/ui/sonner";
import { CartProvider } from "./lib/context/CartContext";
import "@radix-ui/themes/styles.css";
import { Theme } from "@radix-ui/themes";
const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
});
export const metadata: Metadata = {
title: "My App",
description: "Generated by create next app",
};
export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
const session = await auth();
return (
<SessionProvider session={session}>
<html lang="en">
<head>
<link
href="https://fonts.googleapis.com/css2?family=Anton&family=Lilita+One&family=Matemasie&display=swap"
rel="stylesheet"></link>
</head>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
<Theme>
<CartProvider>
<Toaster />
<Header session={session} />
<div className="max-w-7xl mx-auto">{children}</div>
<Footer />
</CartProvider>
</Theme>
</body>
</html>
</SessionProvider>
);
}I’m assuming you’re using npm start
@Anay-208 I’m assuming you’re using npm start
Collared PloverOP
I'm using npm run dev
Try deleting .next folder
@Anay-208 Try deleting .next folder
Collared PloverOP
Even tried deleting .Next
@Anay-208 Try deleting .next folder
Collared PloverOP
Also tried creating a new project
Your OS
@Anay-208 Your OS
Collared PloverOP
You're suggesting I try resetting my os?
Nope
I’m literally asking for your OS
@Anay-208 I’m literally asking for your OS
Collared PloverOP
Windows 11
can you share your project structure(screenshot)
Answer
and it can also be due to antivirus
Or If you have valorant, try disabling Riot Vanguard
@Anay-208 and it can also be due to antivirus
Collared PloverOP
I think it's finally fixed now. It was probably my antivirus causing the issue, thanks.