Open BorisZubchenko opened 8 months ago
+1 — any idea how to fix this?
The simplest workaround is to disable next.js SSR on the affected components by moving your page.tsx
-> editor.client.tsx
and then using this for page.tsx
import dynamic from "next/dynamic";
export default dynamic(() => import("./editor.client"), {
ssr: false,
});
The root cause seems to be use of self
in node_modules/cuid/lib/fingerprint.browser.js
.
Bug report
Packages affected
Description of the problem
I can't make the simplest example work with Next.js and Nodebox.
What were you doing when the problem occurred?
What steps can we take to reproduce the problem?
page.tsx
import { Nodebox } from '@codesandbox/nodebox' import { useEffect, useRef } from 'react'
export default function Home() { const iframeRef = useRef(null)
useEffect(() => { const thisEffect = async () => { if (!iframeRef.current) { return }
})
return (
) }
Link to sandbox: link
Your Environment