stormy-gold
stormy-goldā€¢10mo ago

Build Error in @refinedev/hasura

Running npm run build which runs tsc && refine build I get this error:
node_modules/@refinedev/hasura/src/utils/generateFilters.ts:4:34 - error TS2307: Cannot find module 'src/dataProvider' or its corresponding type declarations.

4 import { NamingConvention } from "src/dataProvider";
~~~~~~~~~~~~~~~~~~
node_modules/@refinedev/hasura/src/utils/generateFilters.ts:4:34 - error TS2307: Cannot find module 'src/dataProvider' or its corresponding type declarations.

4 import { NamingConvention } from "src/dataProvider";
~~~~~~~~~~~~~~~~~~
I have installed "@refinedev/hasura": "^6.4.10",
6 Replies
kapa.ai
kapa.aiā€¢10mo ago
Hi @geoffatsource. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The extracts provided do not contain specific information about the error you're encountering with the @refinedev/hasura package. However, the error message suggests that TypeScript is unable to find the module 'src/dataProvider'. This could be due to a variety of reasons such as incorrect path, missing files, or incorrect configuration. You might want to check your project structure and ensure that the 'src/dataProvider' module exists and is correctly referenced in your code. Also, reinstalling your node_modules or updating your @refinedev/hasura package to the latest version might help. For more detailed information, you can refer to the refine documentation (https://refine.dev/docs). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.aiā€¢10mo ago
<@1014305963219615754> kapa.ai is still learning and improving, please let us know how it did by reacting below
stormy-gold
stormy-goldā€¢10mo ago
This error also carries through when I swizzle
national-gold
national-goldā€¢10mo ago
Can you try absolute path pls ?
stormy-gold
stormy-goldā€¢10mo ago
That error is in your npm package, and the only place I am importing it is using syntax import { GraphQLClient } from "@refinedev/hasura"; since everything else is swizzled Hmm.. I rm'ed node_modules and reinstalled and it's fine now. šŸ¤·ā€ā™‚ļø šŸ‘
national-gold
national-goldā€¢10mo ago
@geoffatsource Thanks for the issue. After swizzled the hasura data-provider, imported the paths are wrong. We will fix this. If you want, you can open Github issue šŸ™Œ