We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
vue add
1 parent 26c4899 commit 30f7242Copy full SHA for 30f7242
packages/@vue/cli/lib/add.js
@@ -20,7 +20,7 @@ async function add (pluginName, options = {}, context = process.cwd()) {
20
21
// for `vue add` command in 3.x projects
22
const servicePkg = loadModule('@vue/cli-service/package.json', context)
23
- if (semver.satisfies(servicePkg.version, '3.x')) {
+ if (servicePkg && semver.satisfies(servicePkg.version, '3.x')) {
24
// special internal "plugins"
25
if (/^(@vue\/)?router$/.test(pluginName)) {
26
return addRouter(context)
0 commit comments