Description
Version
3.1.0
Node and OS info
Node v10.13.0 / npm 6.4.1
Steps to reproduce
npm install -g @vue/cli
npm install -g @vue/cli-service-global
What is expected?
vue serve
should start the prototyping server
What is actually happening?
(node:15758) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'version' of undefined
at module.exports (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-plugin-eslint/index.js:20:29)
at plugins.forEach (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/Service.js:79:7)
at Array.forEach ()
at Service.init (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/Service.js:78:18)
at Service.run (/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/@vue/cli-service/lib/Service.js:204:10)
at Object.exports.serve (/usr/local/lib/node_modules/@vue/cli-service-global/index.js:54:33)
at Command.program.command.description.option.option.action (/usr/local/lib/node_modules/@vue/cli/bin/vue.js:104:53)
at Command.listener (/usr/local/lib/node_modules/@vue/cli/node_modules/commander/index.js:315:8)
at Command.emit (events.js:182:13)
at Command.parseArgs (/usr/local/lib/node_modules/@vue/cli/node_modules/commander/index.js:654:12)
(node:15758) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15758) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Following this tutorial https://cli.vuejs.org/guide/prototyping.html
cli-plugin-eslint api directory getting resolved as current project directory https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-eslint/index.js#L8 and so eslintPkg
becomes undefined.
I added plugin to the current directory by vue add @vue/eslint
and dev server started normally.