Shared Dependencies #2079
-
What is the advise for shared dependencies across a Turborepo? For example, if there are 5 websites using Tailwind and Next.js, and I want to always keep them running on the same and latest versions, is there a way I can manage the dependency at the monorepo level, or should I still be going into each of the 5 apps and updating them manually there? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I'm also looking for the answer to this - I have found that installing the shared package as a workspace dependency seems to work, but I've not idea if that's "best practise" my example:
I'm using NPM workspaces, btw |
Beta Was this translation helpful? Give feedback.
-
I spent over 20 hours trying to figure out how to create a core package and then have React, Next, React-dom and reference them in the workspace of the apps. I should of looked at this discussion board and saw this post! Thank you for posting and discussing it! For anyone who tried to create a core package and then reference it in apps as a workspace, the problem i ran into is that the node modules that runs the next command was not being found. The paths were all screwed up and I was unable to resolve it. This solution here is exactly what i am trying to accomplish. I am going to have over 100+ micro apps for clients and wanted to have a single location for React, React-Dom, Next, Typescript, TailwindCSS to help with version control. This is perfect a good solution for me. |
Beta Was this translation helpful? Give feedback.
I'm also looking for the answer to this - I have found that installing the shared package as a workspace dependency seems to work, but I've not idea if that's "best practise"
my example:
I'm using NPM workspaces, btw