From 3b0bf9d7375fbb3acecbf72774e2ba048e14d772 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Sat, 8 Feb 2020 19:25:10 +0800 Subject: [PATCH] fix: fix "Vue packages version mismatch" error caused by other global packages 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. --- packages/@vue/cli/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@vue/cli/package.json b/packages/@vue/cli/package.json index 1f46d6a0eb..6df6e971a2 100644 --- a/packages/@vue/cli/package.json +++ b/packages/@vue/cli/package.json @@ -53,6 +53,7 @@ "shortid": "^2.2.15", "slash": "^3.0.0", "validate-npm-package-name": "^3.0.0", + "vue": "^2.6.11", "vue-jscodeshift-adapter": "^2.0.2", "yaml-front-matter": "^3.4.1" },