vercel / turbo

Incremental bundler and build system optimized for JavaScript and TypeScript, written in Rust – including Turbopack and Turborepo.
https://turbo.build
MIT License
25.67k stars 1.75k forks source link

No context detected when the context is defined in an app and the library that use it is in a package #8635

Closed osvaldo-cv closed 1 week ago

osvaldo-cv commented 3 weeks ago

I have a /hooks package where I use React Query. I have the React Query Providers in the apps, but They are not working. Please check the error here:

Screenshot 2024-06-20 at 7 58 17 PM

The React Query Providers are defined as expected in the root of the projects. I have a nextjs app where I import a function from a package that uses react query.

What is the right way to make this working?

I have the same problem with all the libraries requiring context wrapping.

osvald0 commented 2 weeks ago

Any comment?

ForsakenHarmony commented 1 week ago

Please open an issue on the next.js repo https://github.com/vercel/next.js/issues/new?assignees=&labels=template%3A+bug&projects=&template=1.bug_report.yml