Vite preview error
Using antd, refine, vite builder and react
after i build with vite I am getting error on vite preview
15 Replies
Hey @haribo_mushi! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave:
----------------------
It looks like you are running into an error when using Refine, Ant Design, React, and Vite Builder. Based on the error message, it appears that you are using the
InternalTable
component from Refine.
The error message indicates that the pt.some
function is not being called correctly. This could be due to an incorrect import or an incorrect usage of the useMemo
hook.
To help you debug this issue, please refer to the Refine documentation (https://refine.dev/docs) for more information on the InternalTable
component and the useMemo
hook. Additionally, you can refer to the Ant Design documentation (https://ant.design/docs/react/introduce) for more information on how to use Ant Design components with React.
----------------------Overview | refine
What is refine?
<@886127984711438378> kapa.ai is still learning and improving, please let us how it did by reacting below
rising-crimson•2y ago
Hello @haribo_mushi , it looks like you are missing a package install, if that's not the case, can you give us more context so we can help you faster?
stormy-goldOP•2y ago
but it is working for me in the dev mode tho
I am integrating sentry and trying to push my sourcemap
rising-crimson•2y ago
Perhaps it's installed into devDependencies by accident
stormy-goldOP•2y ago
which package are you referring to ? 😅
i am assuming, I should move
from dev to main dependency ?
Hey @haribo_mushi ,
Could you share a reproducible demo? CodeSanbox, StackBlitz, etc.
Also, refine v4 was released yesterday. If you haven't reviewed it yet, https://refine.dev/blog/refine-v4-announcement/ 💯
Announcing the Release of refine v4! | refine
This release includes several new features that are designed to enhance the developer experience.
stormy-goldOP•2y ago
yup, I am planning to migrate once I am done with current development 😅
I am kind of unsure about how to reproduce this ? I am able to run it on my local dev server but once I run vite build using npm run build and check the preview of it, it gives me the above mentioned error
hmm have you tried our Vite example? Unfortunately we can't help if you can't provide an environment where we can reproduce 😦
https://github.com/refinedev/refine/tree/next/examples/with-vite
stormy-goldOP•2y ago
i understand, sure I will try to set it up on stackblitz later, once done will share it here
Thank you very much for your understanding and patience 🍻
stormy-goldOP•2y ago
i resolved it
realised my .env file wasnt loading up in a production build
had to add loadEnv to load my env. Now the build preview is working fine
hooray 🥳