Help with "Failed to resolve '@refinedev/inferencer/mantine"?

Hi, I'm trying to adapt Refine into an existing React project (bundled by Parcel). I'm struggling to import the mantine inferencer, as follows:
@parcel/core: Failed to resolve '@refinedev/inferencer/mantine' from './src/Routes.tsx' [...]/frontend/src/Routes.tsx:13:35 12 | import { Refine } from "@refinedev/core"; 13 | import { MantineInferencer } from "@refinedev/inferencer/mantine"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I've manually checked and it seems like everything is installed properly in node_modules - package.json and mantine.js look reasonable in the node_module. My editor also wouldn't auto-import the MantineInferencer, so something's off... I'm not sure how to debug this -- any suggestions?
kapa.ai
kapa.ai421d ago
Hey @nilsb7531! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
kapa.ai
kapa.ai421d ago
---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the Refine documentation (https://refine.dev/docs) and Refine blog (https://refine.dev/blog) for more information and examples on using Refine with Mantine. ----------------------
Overview | refine
What is refine?
Blog | refine
A Docusaurus powered blog!
kapa.ai
kapa.ai421d ago
<@768857308251815996> kapa.ai is still learning and improving, please let us how it did by reacting below
graceful-blue
graceful-blue421d ago
Note that I'm able to import Refine from @refinedev/core, but not MantineInferencer from @refinedev/inferencer/mantine
unwilling-turquoise
unwilling-turquoise421d ago
I reproduced this issue, but I couldn't find solution yet
graceful-blue
graceful-blue420d ago
did you use parcel to repro? could this be a parcel-specific issue?
unwilling-turquoise
unwilling-turquoise420d ago
yes i created parcel project and add refine dependencies. I changed some tsconfig, parcel config settings but i couldn't solve the issue. yes it's parcel specific. probably somethings messed up on bundling time. tomorrow I will discuss with the core team Hi @nilsb7531, we discuss with the core team and we found this issue: https://github.com/parcel-bundler/parcel/issues/4155 when you add this to package.json, problem is solved.
"alias": {
"@refinedev/inferencer/mantine": "./node_modules/@refinedev/inferencer/dist/mantine.js"
}
"alias": {
"@refinedev/inferencer/mantine": "./node_modules/@refinedev/inferencer/dist/mantine.js"
}
also we found this package to solve this type of problems but i didn't tested. https://www.npmjs.com/package/@kkirbatski/parcel-resolver-require-resolve
graceful-blue
graceful-blue420d ago
@alicanerdurmaz thanks so much. this does fix it for me, and TIL about package.json exports. How lame that parcel doesn't support them yet. Also thanks for following up. You guys make a great impression with your project with your communications and helpfulness
unwilling-turquoise
unwilling-turquoise419d ago
Thank you 🥹 we are glad to hear that
wise-white
wise-white418d ago
@alicanerdurmaz - I had a similar issue with the MUI version and decided to manually implement by List. Does this affect all inferencers? Thank you!
unwilling-turquoise
unwilling-turquoise418d ago
Yes, effects all inferencers when you use parcel. Do you use parcel ?
wise-white
wise-white417d ago
I don't use Parcel. We use CRA (with react-app-rewired to help us customize) in a mono-repo setup. But I get the same error. I did confirm in my node modules that the inferencer is correctly installed. I will try the alias as well and see if it works.
More Posts
white screen only in iPhoneHello! The problem I have is when I open my site using the ngrok url on iPhone I see a white screenCLI is not generating page?So i use the cli to create resource, yes it does create component for the resource but not page? so Swizzle of DataProviderHey Refine-Team, when I want to swizzle DataProvider, the console just displays the option to swizzlAdding routerProvider to Refine v4 errors with useLocation being used outside of a routerI am trying to upgrade my project to v4 and I've been having lots of issues. Right now trying to useAdd Refine to an existing React project?I'm wondering what the best way is to add Refine to an existing project. I tried adding the CLI, How to use Refine with JavascriptHello, What do I have to do to setup Refine to use JavaScript instead of typescript? I have checked Display success toast notificationI have created auth provider and i implemented login functionality .when I login it display toast uHow can I customize useRegister onSuccess error toast notification message?This is the refine V4 source code for useRegister hook. There is error handling, which by default thSupabase Set role upon signup or signInWithOAuthHi again everyone, How to set claim for role in Supabase when user signup with email and password orResource in useCustomMutation successNotification parameterHow do I access or pass a resource name into useCustomMutation? I use this hook to have a reorderingUse more than one Supabase Table on one PageHey lovely Refine Team, I cant find how to use Data of two Supabase Tables on one Page.how to adding custom type in option(queryOptions) select useCustom ?my use case is to overrides data from api via select options(queryOptions) but i dont know how to aTSconfig errorHey Everyone - I was wondering if anyone else was running into these errors as they were starting a I can't connect my client id as it is asking for a string instead of client_id: process.env.REACT_API can't connect my client id as it is asking for a string instead of client_id: process.env.REACT_API'm trying to create a projectHello everyone, I'm trying to create a project but it only comes with the header, how do I get the sError after upgrade to v4: Uncaught Error: No QueryClient set, use QueryClientProvider to set oneHello everything is fine? by the stack trace the error is in the method: useIsAuthenticated, I am usMultitenant URLsHi all! Anyone have more info on how to provide props to the nextjs-router in v4? We are multitenanUsing response data in errorNotification useFormHello, My REST API sends a JSON with explanation of what's wrong with the response when request failImplement Google Maps in a FormHello everyone, I am having trouble implementing google maps in a form where the user should fill soCannot invoke an object which is possibly 'undefined'Hi everyone, can anyone help me with this? I trying to integrate Access Control with Supabase and wh