keystonejs / keystonejs/keystone

Building static pages fails with prerendering errors - Cannot read properties of null (reading 'useContext')

Open
#7,617 19 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10k
Forks
1.3k
Avg merge
19h 14m
Merged PRs (30d)
19

Description

Upgrade to @keystone-6/ui 2.0.0 (from 1.1.1), run `keystone build`

Expected: The Admin UI bundle builds successfully.
Actual: Building static pages fails with the errors shown in the screenshot below.

![image](https://user-images.githubusercontent.com/87641417/173159777-4e57e8a5-c0c0-45a2-aeb5-b173ace7d1cd.png)

Node version v16.15.1.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by upgrading @keystone-6/ui from 1.1.1 to 2.0.0 and running `keystone build` with Node v16.15.1. Start from the Admin UI static-page prerendering errors shown in the issue, and consider the work complete when the Admin UI bundle builds successfully without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, react, typescript
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.