Skip to content

Create-next-app error - TypeError: Cannot read properties of null (reading 'useContext') #38617

@MaxMcNally

Description

@MaxMcNally

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101
Binaries:
Node: 17.8.0
npm: 8.5.5
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 12.2.2
eslint-config-next: N/A
react: 18.2.0
react-dom: 18.2.0

What browser are you using? (if relevant)

Version 103.0.5060.53 (Official Build) (arm64)

How are you deploying your application? (if relevant)

No response

Describe the Bug

When using the default create-next-app, trying to load the home page gets the "Warning: Invalid hook call" and this error - >
TypeError: Cannot read properties of null (reading 'useContext')

no code changes after running yarn create-next-app --typescript

Also tried yarn create-next-app

Expected Behavior

App should show default home page

Link to reproduction

https://github.com/vercel/next.js/tree/canary/packages/create-next-app

To Reproduce

Run yarn create-next-app --typescript or yarn create-next-app

Follow prompts, load http://localhost:3000/ in browser

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions