Skip to content

yarn add @tanstack/react-query responds with 404 #3790

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

Closed
bstro opened this issue Jul 8, 2022 · 13 comments
Closed

yarn add @tanstack/react-query responds with 404 #3790

bstro opened this issue Jul 8, 2022 · 13 comments

Comments

@bstro
Copy link

bstro commented Jul 8, 2022

Describe the bug

Running yarn add @tanstack/react-query per docs yields a 404 error.

image

Your minimal, reproducible example

n/a

Steps to reproduce

yarn add @tanstack/react-query

Expected behavior

Should work

How often does this bug happen?

No response

Screenshots or Videos

No response

Platform

n/a

react-query version

n/a

TypeScript version

No response

Additional context

No response

@insuusvenerati
Copy link

You can install v4 using yarn add react-query@beta for now.

@Kayyow
Copy link

Kayyow commented Jul 9, 2022

Maybe we should update the installation docs because it state that you can install the package via @tanstack/react-query which isn't currently working.

@addy
Copy link

addy commented Jul 9, 2022

FWIW this is also occurring for the npm i @tanstack/react-query version of the installation process.

@SeanCassiere
Copy link
Member

Hey, by any chance is there something going on with the package being only accessible via an Org or something?

It is currently not listed on NPM or the Yarn registry.
NPM @tanstack/react-query - resolves to a login page
Yarn @tanstack/react-query - returns a not found

@TkDodo
Copy link
Collaborator

TkDodo commented Jul 11, 2022

It hasn't been released on npm yet, the docs redirect was a mistake. Please be patient and use this in the meantime:
#3790 (comment)

@Dev-eloperr
Copy link

I am currently on "react-query": "^4.0.0-beta.23" which I installed using
npm i react-query@beta
Now, I am facing this issue while installing devtools

  1. Running the command in v4 docs (npm i @tanstack/react-query-devtools)
    image

  2. Running the same command after removing @TanStack (npm i --save react-query-devtools)
    image

@TkDodo
Copy link
Collaborator

TkDodo commented Jul 15, 2022

I know this is really confusing, so let me try to clear it up:

for now, all you need is npm i react-query@beta if you want v4 or npm i react-query if you want v3.

Both of them work the same way:

import { useQuery } from 'react-query'
import { ReactQueryDevTools } from 'react-query/devtools'

devtools are bundled with the lib!


once we rollout tanstack query, it will be:

npm i @tanstack/react-query
npm i @tanstack/react-query-devtools

two separate packages, imported separately:

import { useQuery } from '@tanstack/react-query'
import { ReactQueryDevTools } from '@tanstack/react-query-devtools'

there will be a codemod that automatically transforms all imports.

@Dev-eloperr
Copy link

Thank you for the clarification @TkDodo
I believe something wrong is happening while trying to use devtools in version 4.0.0-beta.23.
Code:

import { ReactQueryDevtools } from 'react-query/devtools'

...

        return <QueryClientProvider client={queryClient}>

                      ...

                      <ReactQueryDevtools initialIsOpen={false} />

                    </QueryClientProvider>

Error:
image

@TkDodo
Copy link
Collaborator

TkDodo commented Jul 15, 2022

@billyyyyy3320
Copy link

billyyyyy3320 commented Jul 18, 2022

IMHO, the problem is the document of pre-release and latest version are misplaced.

I could see https://tanstack.com/query/v4 in description and readme. Also, what I need for the latest version is mentioned as beta version(?). The content of https://react-query-beta.tanstack.com/ is actually for v3, right?

Still on React Query v2? No problem! Check out the v2 docs here: https://react-query-v2.tanstack.com/.
Would you like to try React Query v4beta? Check out the v4 beta docs here: https://react-query-beta.tanstack.com/.

@bombillazo
Copy link

bombillazo commented Jul 18, 2022

A warning in this section of the v4 migration guide would be nice while we are in beta since those packages are still not in production but the guide gives the impression this is already released/functional.

@lindan4
Copy link

lindan4 commented Jul 18, 2022

Is there any date on which stable version 4 will be released? The documentation for version 3 was removed or is not available at the moment either for those who want to stick to version 3.

@TkDodo
Copy link
Collaborator

TkDodo commented Jul 18, 2022

https://github.com/TanStack/query/releases/tag/v4.0.0

@TkDodo TkDodo closed this as completed Jul 18, 2022
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

10 participants