Refine dist folder removed @refinedev/core/dist/interfaces
I cannot upgrade because there are tons of missing dependencies now.
None of these imports work anymore:
6 Replies
Hi @geoffatsource. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The issue you're experiencing is due to changes in the way
@refinedev/core
handles imports. As per the migration guide (https://refine.dev/docs/migration-guide/3x-to-4x#import-changes), all @tanstack/react-query
imports that were previously re-exported from @refinedev/core
have been removed. You now need to import them directly from the @tanstack/react-query
package.
For example, instead of:
You should now use:
If the @tanstack/react-query
package is not installed, you can install it with your package manager:
or
or
As for the other imports from @refinedev/core/dist/interfaces
, it seems like they might have been moved or renamed in the new version. You might need to check the updated documentation or source code to find their new locations or names. If you're still having trouble, consider reaching out to the Refine community or maintainers for more specific guidance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1014305963219615754> kapa.ai is still learning and improving, please let us know how it did by reacting below
extended-salmonOP•11mo ago
Looks like this commit is where it all was refactored: https://github.com/refinedev/refine/commit/404b2ef5e1b8fed469eeab753bac8736ed3fe58e
GitHub
refactor(core): update type definitions (#5755) · refinedev/refine@...
* refactor(core): access control
* refactor(core): audit log
* refactor(core): auth
* refactor(core): data
* fix(core): missing exports, test types
* refactor(core): i18n
* refact...
extended-salmonOP•11mo ago
I think a migration guide or migrate tool would help us here
fascinating-indigo•11mo ago
Hey @geoffatsource, in
@refinedev/core
imports other than the root wasn't meant to resolve in the first place. Those should never be imported like this.
Just checked your list of imports, they can be replaced by imports from root or can be extracted through utilities like:
QueryObserverResult
can be extracted from data hooks like ReturnType<typeof useList>
QueryBuilderOptions
and Fields
can be extracted from MetaQuery
type.
AuthBindings
and INotificationContext
is already exported and IDataContextProvider
can be replaced with DataProvider
or DataBindings
or DataProviders
types
I'll be happy to help if you have any missing types not exported from root and cant be obtained from other typesextended-salmonOP•10mo ago
Thank you!