Skip to content

Install a npm package in two different version (vue2 and vue3), and failed to starting dev server #1022

Closed Answered by ma-jahn
sonofmagic asked this question in Help
Discussion options

You must be logged in to vote

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.

  1. Remove your node_modules
    rm -rf node_modules apps/**/node_modules

  2. Remove your yarn.lock

  3. Fix your package.json by adding / replacing workspaces

"workspaces": {
    "packages": [
      "packages/*",
      "apps/*"
    ],
    "nohoist": [
      "**/vue", "**/vue-template-compiler", "**/vite-plugin-vue2", "**/vite"…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@sonofmagic
Comment options

Answer selected by sonofmagic
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Suniron
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants