Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. #24

Open
TendezaDev opened this issue Apr 26, 2023 · 8 comments

Comments

@TendezaDev
Copy link

TendezaDev commented Apr 26, 2023

Error occurs when dragging a card to another lane. I'm using Vite. Current code:

function App() {
  const data = {
    lanes: [
      {
        id: "lane1",
        title: "Planned Tasks",
        label: "2/2",
        cards: [
          {
            id: "Card1",
            title: "Write Blog",
            description: "Can AI make memes",
            label: "30 mins",
            draggable: true,
          },
          {
            id: "Card2",
            title: "Pay Rent",
            description: "Transfer via NEFT",
            label: "5 mins",
            metadata: { sha: "be312a1" },
          },
        ],
      },
      {
        id: "lane2",
        title: "Completed",
        label: "0/0",
        cards: [],
      },
    ],
  };

  return (
    <>
      <Board data={data}/>
    </>
  )
}

export default App
@KaiSpencer
Copy link
Owner

Hi @TendezaDev,

What version are you using?
I believe I fixed this recently, can you try 2.0.14

@0xradical
Copy link

Hi, @KaiSpencer, I'm also having this issue. Version I'm using is 2.0.14 and I'm using on a Next.js application, if that helps...

@agustinfranchetti
Copy link

Im having the same issue, also on a next.js application

@KaiSpencer
Copy link
Owner

Damn, thanks guys. Let me do some testing on nextjs and get back to you. Just to help which versions of next are you using?

@agustinfranchetti
Copy link

@KaiSpencer I'm currently on nextjs 13, (using pages, no app directory)

@TimMikeladze
Copy link

I'm running into this as well, using [email protected] and [email protected]

@KaiSpencer
Copy link
Owner

Thanks all, I am reproducing this now.

In the process of adding a nextjs example to the repo, and work on investigating the issue and a fix for it.

@KaiSpencer
Copy link
Owner

@0xradical @TimMikeladze @TendezaDev @agustinfranchetti

This is a React 18 strict mode issue.

A workaround is to disable strict mode with reactStrictMode: false if NextJS.

I will have to debug what the root issue is, but that will at least make the library work for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants