mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-20 04:28:28 -05:00
fix: invalid version error when modules not installed (#4859)
fix #4781
This commit is contained in:
committed by
Haoqun Jiang
parent
2c13800051
commit
ef2cbae66f
@@ -201,6 +201,10 @@ module.exports = class Upgrader {
|
||||
const installed = await this.pm.getInstalledVersion(name)
|
||||
const wanted = await this.pm.getRemoteVersion(name, range)
|
||||
|
||||
if (installed === 'N/A') {
|
||||
throw new Error('At least one dependency is not installed. Please run npm install or yarn before trying to upgrade')
|
||||
}
|
||||
|
||||
let latest = await this.pm.getRemoteVersion(name)
|
||||
if (includeNext) {
|
||||
const next = await this.pm.getRemoteVersion(name, 'next')
|
||||
|
||||
Reference in New Issue
Block a user