I want to run a local server.
When I created a new next-app project and ran local server with npm run dev
, it worked.
But after there are some changes, I got this error for npm run dev
So I removed the folder .next
, and npm run build
and try running server again.
It worked at first, but I got the same error after refreshing.
Error:
[Error: UNKNOWN: unknown error, open {
errno: -4094,
code: 'UNKNOWN',
syscall: 'open',
path: Homepage_client_ver2.0\.next\static\chunks\app\layout.js'
}
//package.json
{
"name": "homepage_client_ver2.0",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@next/third-parties": "^14.2.4",
"next": "^14.2.4",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"eslint": "^8.2.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-config-next": "14.2.4",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"postcss": "^8",
"prettier": "^3.3.2",
"tailwindcss": "^3.4.1",
"typescript": "^5.5.2"
}
}
Things I tried:
- remove ‘node_modules’ folder, ‘.next’ folder -> install -> run server (for removing cache)
- ‘npm run build’ -> run server (it was effective for a while)
- change the path to remove Korean characters (I think it might be a reason for error but it wasn’t)
- remove my local repository, and clone again (to ensure that no.1 is done correctly again)
- reset the OS as the error seemed causing in the ‘system call’
New contributor
gahyun is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.