From 866103bbddae434b4b4d99a4ce4e019bcd2d7454 Mon Sep 17 00:00:00 2001 From: beardedpayton Date: Mon, 24 Jun 2019 14:15:27 -0400 Subject: [PATCH] feat: enhance error message when plugin module insn't loaded correctly --- packages/@vue/cli/lib/Generator.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/@vue/cli/lib/Generator.js b/packages/@vue/cli/lib/Generator.js index 87386bea07..f477287685 100644 --- a/packages/@vue/cli/lib/Generator.js +++ b/packages/@vue/cli/lib/Generator.js @@ -99,6 +99,10 @@ module.exports = class Generator { : inferRootOptions(pkg) // apply generators from plugins plugins.forEach(({ id, apply, options }) => { + if(!apply) { + logTypes.error(`This error may occur when your node_modules do not contain any + actual Vue CLI plugins. Please run npm install and try again.`) + } const api = new GeneratorAPI(id, this, options, rootOptions) apply(api, options, rootOptions, invoking) })