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?
12 Replies
Hey @nilsb7531! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
----------------------
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!
<@768857308251815996> kapa.ai is still learning and improving, please let us how it did by reacting below
fair-rose•2y ago
Note that I'm able to import
Refine
from @refinedev/core
, but not MantineInferencer
from @refinedev/inferencer/mantine
wise-white•2y ago
I reproduced this issue, but I couldn't find solution yet
fair-rose•2y ago
did you use parcel to repro? could this be a parcel-specific issue?
wise-white•2y 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.
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
fair-rose•2y 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
wise-white•2y ago
Thank you 🥹 we are glad to hear that
correct-apricot•2y 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!wise-white•2y ago
Yes, effects all inferencers when you use parcel. Do you use parcel ?
correct-apricot•2y 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.