获取TypeError:无法读取Next.js上undefined的属性(阅读“current”)

b1payxdu  于 2023-08-04  发布在  其他
关注(0)|答案(1)|浏览(99)

TypeError: Cannot read properties of undefined (reading 'current')我在第一次运行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项目。

amrnrhlw

amrnrhlw1#

我发现这是我在chrome中的一个扩展。我不知道哪一个我刚刚删除了我所有的扩展,它似乎解决了这个问题

相关问题