correct-apricot
correct-apricot2mo ago

Error during build

Using NX + Refine + Chakra, my app builds locally but not in CI (BitBucket). I get the following error: vite v5.2.8 building for production... transforming... ✓ 4 modules transformed. x Build failed in 728ms error during build: Error: [vite]: Rollup failed to resolve import "@refinedev/chakra-ui" from "/opt/atlassian/pipelines/agent/build/apps/tfh-crm/src/app/App.tsx". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.external
3 Replies
kapa.ai
kapa.ai2mo ago
Hi @doender. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the error message you provided, it seems like the issue is with the @refinedev/chakra-ui package not being resolved during the build process. This could be due to a variety of reasons such as the package not being installed correctly, or not being included in the dependencies of your package.json file. Unfortunately, the knowledge sources provided do not contain specific information about this error or how to resolve it in the context of using NX + Refine + Chakra. However, as a general suggestion, you could try the following steps: 1. Ensure that @refinedev/chakra-ui is correctly installed and listed in your package.json file. 2. Try clearing your node_modules directory and reinstalling your dependencies. 3. Check your build configuration to ensure that @refinedev/chakra-ui is not being excluded from the build process. If the issue persists, it would be best to reach out to the Refine community or check their official documentation for more specific guidance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@795674877843210270> kapa.ai is still learning and improving, please let us know how it did by reacting below
correct-apricot
correct-apricot2mo ago
@kapa.ai I've already ensured (1) and (2). How can I check in the build configuration that the package is not being excluded?