ampproject / ampproject/amphtml

🍱 [all components] None of the BENTO components works on Nextjs 12 - SSR

Open
#38,171 1 comment 2 reactions 0 assignees View on GitHub
P3: When Possible Stale Type: Bug WG: bento
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

None of the Bento components works on Nextjs SSR

The guide on site don't work:
https://bentojs.dev/documentation/guides/bento-next.js-guide/

All of them throw an error: ReferenceError: self is not defined

I opened an issue on bentojs.dev
https://github.com/ampproject/bentojs.dev/issues/183

### Reproduction Steps

Follow the guide at
https://bentojs.dev/documentation/guides/bento-next.js-guide/

### Relevant Logs

_No response_

### Browser(s) Affected

_No response_

### OS(s) Affected

_No response_

### Device(s) Affected

_No response_

### AMP Version Affected

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by following the Bento Next.js guide with Next.js 12 and reproduce the server-side rendering failure: `ReferenceError: self is not defined`. Review the affected Bento component entry points and the related bentojs.dev issue for context. Done means the components render through Next.js SSR without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.