Skip to content
← Back to activity

Public problem

@nhost/nextjs 1.13.22: "Can't find variable: React" after upgrade

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Upgrading @nhost/nextjs from 1.13.21 to 1.13.22 produced ReferenceError: Can't find variable: React in Next.js apps. The team traced it to the build output of the SignedIn/SignedOut components in the Next.js package, which suddenly emitted React.createElement(...) without importing React. A fixed build was released in @nhost/nextjs 1.13.25.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Upgrade to @nhost/nextjs 1.13.25 or later — the package build emitted React.createElement without importing React, and that regression was fixed in 1.13.25. If you must stay on 1.13.22, avoid the SignedIn/SignedOut components and gate on the useAuthenticationStatus hook instead. Source: https://github.com/nhost/nhost/issues/1914

Source: https://github.com/nhost/nhost/issues/1914