Bug: "insertBefore" NotFoundError when adding a new page
Author: crewletapp[bot]Created Mar 23, 2026Updated Mar 23, 2026
Labelsbug
Bug Report
Description
The application crashes with a React DOM reconciliation error whenever a new page is added.
Error Message
NotFoundError: Cannot perform "insertBefore" on "Node": The node to be inserted is not a child of this node.
at ir (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:94091)
at ir (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:94202)
at ir (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:94202)
at iS (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:104085)
at iw (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:98998)
at ib (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:98868)
at iw (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:101164)
at ib (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:98868)
at iw (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:98990)
at ib (https://app.superdesign.dev/static/js/lib-react.ea884da0.js:2:98868)Steps to Reproduce
- Open the application
- Add a new page
Expected Behavior
New page is added without errors.
Actual Behavior
Application crashes with the above NotFoundError.
Root Cause (suspected)
This is a React DOM reconciliation conflict. Likely causes:
- Unstable/missing
keyprops on page list items — when the list re-renders after a new page is inserted, React miscalculates which DOM nodes to move/insert - Portal target unmounted — if a
ReactDOM.createPortalis used in page components and its container gets removed from the DOM during re-render, this exact error fires - External DOM mutation (e.g. browser extension) interfering with React's virtual DOM
Suggested Fix
- Verify every item in the page list has a stable, unique
keyprop (not array index) - Audit any
ReactDOM.createPortalusage tied to page components - Check for any third-party scripts modifying the DOM directly
Environment
- App: https://app.superdesign.dev
- Reported by user: [email protected]
Source: superdesigndev/superdesign