类型错误:无法读取未定义的属性(读取“当前”) 我在第一次运行 nextjs 项目时收到此错误。这是我正在运行的命令: npx create-next-app@latest my-test-app --typescript --tailwind --eslint
这就是我的 package.json 的样子:
{
"name"; "my-test-app"
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev"
"build": "next build"
"start": "next start"
"lint": "next lint"
"dependencies": {
    "@types/node": "20.4.4",
    "@types/react": "18.2.15",
    "@types/react-dom": "18.2.7",
    "autoprefixer": "10.4.14",
    "eslint": "8.45.0",
    "eslint-config-next": "^13.4.12",
    "next": "^13.4.12-canary.0",
    "postcss": "8.4.27",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "tailwindcss": "3.3.3",
    "typescript": "5.1.6"
  }
}
我认为这是我的问题,因为其他人自己也跑得很好。
我在 2021 年 MacBook Pro 上运行它。我尝试运行 npm i next@canary 但它仍然给我带来同样的问题。
我实际上还没有做任何事情,只是运行它,无论我创建多少个 nextjs 项目,它都会不断地给我这个错误。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
我发现它是我在 Chrome 中的扩展之一。我不知道我刚刚删除了哪一个扩展程序,它似乎解决了这个问题