Skip to content

Commit b916c32

Browse files
committed
chore: improve vue inspect failure message
ref #1805
1 parent fe11774 commit b916c32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/@vue/cli/lib/inspect.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ module.exports = function inspect (paths, args) {
1010
servicePath = resolve.sync('@vue/cli-service', { basedir: cwd })
1111
} catch (e) {
1212
const { error } = require('@vue/cli-shared-utils')
13-
error(`Failed to locate @vue/cli-service. Make sure you are in the right directory.`)
13+
error(
14+
`Failed to locate @vue/cli-service.\n` +
15+
`Note that \`vue inspect\` is an alias of \`vue-cli-service inspect\`\n` +
16+
`and can only be used in a project where @vue/cli-service is locally installed.`
17+
)
1418
process.exit(1)
1519
}
1620
const binPath = path.resolve(servicePath, '../../bin/vue-cli-service.js')

0 commit comments

Comments
 (0)