Skip to content

Commit d8db292

Browse files
authored
fix: fix "Vue packages version mismatch" error caused by other global packages (#5163)
closes #5161 The root cause of such issues: `vue-jscodeshift-adapter` requires `vue-template-compiler`. `vue-template-compiler` tries to require the `vue` package and check its version on startup. Normally, there's no `vue` package in the dependency tree of `@vue/cli`, so this check will just skip. But if the user has installed some other global package that depend on `vue`, and hoists it to the root `node_modules`, `vue-template-compiler` would successfully require it and check against that `vue` version, which sometimes may be outdated, thus failing the bootstrap process.
1 parent 5cb988c commit d8db292

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/@vue/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"shortid": "^2.2.15",
5454
"slash": "^3.0.0",
5555
"validate-npm-package-name": "^3.0.0",
56+
"vue": "^2.6.11",
5657
"vue-jscodeshift-adapter": "^2.0.2",
5758
"yaml-front-matter": "^3.4.1"
5859
},

0 commit comments

Comments
 (0)