You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Next.js执行npm run dev遇UNKNOWN(errno:-4094)启动报错求助

Next.js npm run dev 刷新后出现UNKNOWN文件打开错误

问题描述

新建next-app项目时执行npm run dev可正常启动本地服务器,但修改项目内容后再次执行该命令出现报错。删除.next文件夹并执行npm run build后首次启动服务器正常,刷新页面后又出现相同错误。

错误信息

[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"
  }
}

已尝试的解决方法

  • 删除node_modules和.next文件夹,重新安装依赖后启动服务器(清除缓存)
  • 执行npm run build后启动服务器(暂时有效)
  • 修改项目路径移除韩文(怀疑是报错原因,但无效)
  • 删除本地仓库并重新克隆(确保步骤1正确执行)
  • 重置操作系统(因错误涉及系统调用)

求助

以上方法均无法解决问题,寻求技术解决方案。

内容的提问来源于stack exchange,提问作者gahyun

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.21 09:49:58