Error: UNKNOWN: unknown error
Answered
Singapura posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
SingapuraOP
I just ran my npm and get this unknown error:
the package.json file has this inside:
which is all. I have no idea how to fix this, but I can't run my npm dev until it's fixed
$ npm run dev
> ergo@0.1.0 dev
> next dev
[Error: UNKNOWN: unknown error, readlink 'C:\Users\beaur\OneDrive\Documents\programming\ergo\ergo\.next\package.json'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'readlink',
path: 'C:\\Users\\beaur\\OneDrive\\Documents\\programming\\ergo\\ergo\\.next\\package.json'
}
the package.json file has this inside:
{"type": "commonjs"}
which is all. I have no idea how to fix this, but I can't run my npm dev until it's fixed
22 Replies
![Avatar](https://cdn.discordapp.com/avatars/657067112434499595/aff4eeb34922ca980b0d5fbb5bc60c21.webp?size=256)
risky
can you try deleting .next folder and trying again
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
SingapuraOP
Ah, that worked!
Thank you very much I truly appreciate the help
Why did that happen? A bug in the folder?
![Avatar](https://cdn.discordapp.com/avatars/657067112434499595/aff4eeb34922ca980b0d5fbb5bc60c21.webp?size=256)
risky
i think some weird cache issue, it may have gotten a bit confused when you saved a file
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
SingapuraOP
okay. Thanks and thank you for the quick response
![Avatar](https://cdn.discordapp.com/avatars/657067112434499595/aff4eeb34922ca980b0d5fbb5bc60c21.webp?size=256)
risky
no problem ðŸ‘
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
SingapuraOP
I'm sorry to bother you again. But another issue has come up
It seems like deleting the .next folder somehow deleted root layout?
I get this:
![Image](https://cdn.discordapp.com/attachments/1155886485875208304/1155888635439222824/image.png)
But 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>
)
}
Which just has my navbar
@risky
(sorry about the tag I wasn't sure if you could see this since it's marked as solved)
![Avatar](https://cdn.discordapp.com/avatars/657067112434499595/aff4eeb34922ca980b0d5fbb5bc60c21.webp?size=256)
risky
are you sure that it is in the same folder?
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
SingapuraOP
yes
![Image](https://cdn.discordapp.com/attachments/1155886485875208304/1155889665967145081/image.png)
![Avatar](https://cdn.discordapp.com/avatars/657067112434499595/aff4eeb34922ca980b0d5fbb5bc60c21.webp?size=256)
risky
ahhhhhh
umm can you create a new post as its now a diferent issue (and just resend the images and code) - also as im about to go to sleep... and i think someone else should beable to help you furthere there
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
SingapuraOP
okay 👠will do. Thank you for the help