Install a npm package in two different version (vue2 and vue3), and failed to starting dev server #1022
-
I installed vue2 and vue3 in different apps. Vue3-app start successfully and the error shows packages version mismatch
How can i set my config to run both of them? ExpectedVue3-app start successfully ScreenshotRepo Url |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @sonofmagic , from my understanding this issue is not related to turborepo itself. It's actually an yarn workspaces related topic. Within your error log you'll see that your vite project is loading vue 3 from the root node_modules directory. Since both your apps are using the vue package in different versions you should make sure these dependencies are not being hoisted.
Hoisting Explained: |
Beta Was this translation helpful? Give feedback.
-
How can i do similar with pnpm ? I do this in the root
But I got this error on build:
I think vue 3 is in conflict with vue 2 in my monorpeo |
Beta Was this translation helpful? Give feedback.
-
anybody know how to fix same problem on using npm ? |
Beta Was this translation helpful? Give feedback.
Hi @sonofmagic ,
from my understanding this issue is not related to turborepo itself. It's actually an yarn workspaces related topic.
Within your error log you'll see that your vite project is loading vue 3 from the root node_modules directory.
Since both your apps are using the vue package in different versions you should make sure these dependencies are not being hoisted.
Remove your
node_modules
rm -rf node_modules apps/**/node_modules
Remove your yarn.lock
Fix your package.json by adding / replacing workspaces