Home  >  Q&A  >  body text

TypeError: Cannot read property of undefined on Next.js (reading 'current')

TypeError: Cannot read property of undefined (reading 'current') I get this error the first time I run my nextjs project. This is the command I'm running: npx create-next-app@latest my-test-app --typescript --tailwind --eslint

This is what my package.json looks like:

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

I think this is my problem as others have had good runs themselves.

I'm running this on a 2021 MacBook Pro. I tried running npm i next@canary but it still gives me the same problem.

I haven't actually done anything yet but run it and it keeps giving me this error no matter how many nextjs projects I create.

P粉714890053P粉714890053373 days ago435

reply all(1)I'll reply

  • P粉894008490

    P粉8940084902023-09-15 00:24:54

    I found it as one of my extensions in Chrome. I don't know which extension I just removed and it seemed to fix the problem

    reply
    0
  • Cancelreply