Identifier '__vite__injectQuery' has already been declared error

Open
#247 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript, vite

Research direction

Reproduce the setup described in the issue: install react-router-devtools, add reactRouterDevTools() to the Vite config, and render EmbeddedDevTools alongside the TanStack Form plugin in TanStackDevtools. Inspect the Vite plugin and devtools integration at the point where __vite__injectQuery is declared. Done means both devtools work together without the duplicate-identifier error.

Written by the indexing model from the issue text.

Description

I got this error in browser console. Error is Identifier '__vite__injectQuery' has already been declared error.

These are steps I did,

Step 1 - Installed this - npm install react-router-devtools -D
Step 2 - Added to vite config file in first place - reactRouterDevTools(),
Step 3 - Add this tool with Tanstack devtool

<TanStackDevtools
                        plugins={[
                          {
                            name: "React Router Devtools",
                            render: <EmbeddedDevTools />,
                            defaultOpen: true,
                          },
                          {
                            name: "TanStack Form",
                            render: <FormDevtoolsPanel />,
                          },
                        ]}
                        eventBusConfig={{
                          connectToServerBus: true,
                        }}
                      />

But I got that error. When I remove <EmbeddedDevTools /> in TanStackDevtools code. My app work fine.

Dominant language
TypeScript
Stars
975
Forks
55
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-forge-io/react-router-devtools

All issues in code-forge-io/react-router-devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.