TypeError when rendering BuilderComponent in Next.js app
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 1.2k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 17
Description
**Describe the bug**
When running a Next.js app that renders `BuilderComponent` from `@builder.io/react` I get the following error in the server console:
```
- error TypeError: Cannot read properties of null (reading 'registered')
```
There is no additional information printed in the console, and the page in the browser seems to render correctly. This happens on any builder page I visit.
I'm using a starter Next.js project with the Builder code taken straight from the documentation, and latest Builder SDK versions.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a new Next.js project and configure it with Builder SDK
2. Add `export const runtime = 'edge';` to the page with BuilderComponent
3. Open a page that will render content from Builder
4. Notice the error in the console
**Additional context**
From package.json:
```json
"dependencies": {
"@builder.io/dev-tools": "^0.1.17",
"@builder.io/react": "^3.0.14",
"@builder.io/sdk": "^2.0.8",
"@cloudflare/next-on-pages": "^1.6.0",
"@types/node": "20.5.0",
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"autoprefixer": "10.4.15",
"eslint": "8.47.0",
"eslint-config-next": "13.4.18",
"next": "^13.4.19",
"postcss": "8.4.28",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.3",
"typescript": "5.1.6"
},
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.