Can I Import @tanstack/react-query in the Web Package Without Direct Installation? #10244
Unanswered
Patricia-Patch
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
May I ask for help? I'm new to
turborepo. I set up an API packagepackages/apifortRPC. I followed this guide: tRPC Documentation for the Next.js app router. Now that I have it set up properly, I added my API package as a dependency in the Next.jswebfolder. I then imported tRPC from the API package intoweb.In the
webfolder, I haven’t installed any packages required by tRPC—all tRPC packages are in the API package. My question is: can I import@tanstack/react-queryinwebeven though I didn’t install it in web? It is installed in my API package, and my API package is listed in the dependencies in the web'spackage.json, or do I also need to install@tanstack/react-queryin web?Because when I hover over the import of
@tanstack/react-queryinweb, this appears:module "c:/Users/craft/Desktop/Dev/rhu-ii/node_modules/@tanstack/react-query/build/modern/index"It is not coming from my API package.
Additional information
Beta Was this translation helpful? Give feedback.
All reactions