vercel/styled-jsx error DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
#66389
Labels
bug
Issue was opened via the bug report template.
invalid link
The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Link to the code that reproduces this issue
https://github.com/vercel/next.js
To Reproduce
See the issue here #65772
Note: I linked to https://github.com/vercel/next.js as a stand-in for the docs page https://github.com/vercel/next.js/blob/canary/docs/02-app/02-api-reference/05-next-config-js/compress.mdx
My issue is in styled-jsx repo:
head.insertBefore
is getting called whenhead
isundefined
https://github.com/vercel/styled-jsx/blob/main/src/lib/stylesheet.js#L247-L250This happens on page load or page refresh.
Current vs. Expected behavior
Current
Expected
No error
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.5.0: Wed May 1 20:14:38 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6020 Available memory (MB): 32768 Available CPU cores: 12 Binaries: Node: 20.9.0 npm: 10.1.0 Yarn: 4.1.0 pnpm: N/A Relevant Packages: next: 14.2.3 // Latest available version is detected (14.2.3). eslint-config-next: N/A react: 18.3.1 react-dom: 18.3.1 typescript: N/A Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Runtime
Which stage(s) are affected? (Select all that apply)
Vercel (Deployed), Other (Deployed)
Additional context
My issue is in styled-jsx repo:
head.insertBefore
is getting called whenhead
isundefined
https://github.com/vercel/styled-jsx/blob/main/src/lib/stylesheet.js#L247-L250This happens on page load or page refresh.
Related issues:
DOMException
withinsertBefore
during frequent page transitions with language translation in Next.js-based documentation sites #50751The text was updated successfully, but these errors were encountered: