[Next.js] errno: -4094

Bie·2024년 3월 12일
[Error: UNKNOWN: unknown error, open 'C:\Users\User\Work\**\**\.next\static\chunks\app\layout.js'] {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'open',
  path: 'C:\\Users\\User\\Work\\**\\**\\.next\\static\\chunks\\app\\layout.js'

1) This error generally happens when you import a file but the casing is wrong.

-> 실제로 나도 image path 실수를 고치니 해결됨

2) Quick fix : is stop your development server
Close the running instance of your project on the browser
Delete the .next folder
Restart your ide (VS code)
pray that its fixed

-> run dev 할때마다 해줘야함

3) Automate removing .next folder when project starts

"dev": "rimraf .next && next dev"

-> 아예 명령줄에 .next 지우는걸 추가하기

결론: 아무 이유없이 나는 에러는 아니니 다시 한번 import에 실수한게 없는지 찾아보고 급할땐 2,3 방법을 쓰자.

참고한 github

0개의 댓글