stormy-gold
stormy-gold17mo ago

Is there any NX plugin to generate Refine templates in existing NX projects?

Is there any NX plugin to generate Refine templates in existing NX projects?
6 Replies
kapa.ai
kapa.ai17mo ago
Hi @rturan. 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 provided extracts do not mention a specific NX plugin for generating Refine templates in existing NX projects. However, you can use NX with Refine as mentioned in the documentation (https://refine.dev/docs/examples/build-systems/nx). Here is the command to create a Refine app with NX:
npm create refine-app@latest -- --example with-nx
npm create refine-app@latest -- --example with-nx
For more detailed information, you may want to check the official Refine documentation (https://refine.dev/docs). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai17mo ago
<@444839248055762946> kapa.ai is still learning and improving, please let us know how it did by reacting below
stormy-gold
stormy-goldOP17mo ago
Hi i have a monorepo with nx and trying to add refine this repo as a new app. But i can not start the app. I created an app with refine.new and copied into project, using the vite-react configuration. my project.json file is as following
stormy-gold
stormy-goldOP17mo ago
the error coming from the Authenticated component useLocation() may be used only in the context of a <Router> component.
rare-sapphire
rare-sapphire17mo ago
Hey @rturan, i remember seeing this error before. I think it's related to multiple versions of react-router-dom and react-router installed in a monorepo. Can you check the other packages to see if you have a single version of it? 🙏
stormy-gold
stormy-goldOP17mo ago
Thanks! i will check my dependencies is as following: "@refinedev/react-router-v6": "^4.1.0", "react-router-dom": "6.11.2", yeah it was the dependency issue! yarn why react-router-dom yarn why v1.22.19 [1/4] Why do we have the module "react-router-dom"...? [2/4] Initialising dependency graph... [3/4] Finding dependency... [4/4] Calculating file sizes... => Found "react-router-dom@6.11.2" info Has been hoisted to "react-router-dom" info This module exists because it's specified in "dependencies". info Disk size without dependencies: "624KB" info Disk size with unique dependencies: "3.3MB" info Disk size with transitive dependencies: "3.3MB" info Number of shared dependencies: 2 => Found "@refinedev/react-router-v6#react-router-dom@6.15.0" info This module exists because "@refinedev#react-router-v6" depends on it. info Disk size without dependencies: "3.56MB" info Disk size with unique dependencies: "6.25MB" info Disk size with transitive dependencies: "6.25MB" info Number of shared dependencies: 2 Done in 0.68s. @refinedev/react-router-v6 depends on react-router-dom@6.15.0 @aliemirs thanks for your help!