You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clone repo and cd into one of the packages repo/a or repo/b
Run vue upgrade
What is expected?
Should upgrade without errors
What is actually happening?
It doesn't find the vue-cli packages from package.json
$ vue --version
@vue/cli 4.0.5
$ vue upgrade
⠋ Gathering package information... ERROR TypeError: Invalid Version: N/A
TypeError: Invalid Version: N/A
at new SemVer (/Users/user/.config/yarn/global/node_modules/@vue/cli/node_modules/semver/semver.js:332:11)
at compare (/Users/user/.config/yarn/global/node_modules/@vue/cli/node_modules/semver/semver.js:647:10)
at Function.lt (/Users/user/.config/yarn/global/node_modules/@vue/cli/node_modules/semver/semver.js:688:10)
at Upgrader.getUpgradable (/Users/user/.config/yarn/global/node_modules/@vue/cli/lib/Upgrader.js:212:20)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Upgrader.checkForUpdates (/Users/user/.config/yarn/global/node_modules/@vue/cli/lib/Upgrader.js:229:24)
at async upgrade (/Users/user/.config/yarn/global/node_modules/@vue/cli/lib/upgrade.js:24:24)
Running vue upgrade @vue/cli-service works, but it adds a duplicate @vue/cli-service entry in package.json, so it still doesn't see the original entry.
@vue/cli 3.12.1 seems to be affected as well, even though it doesn't throw an error:
$ vue --version
3.12.1
$ vue upgrade major
✔ Gathering update information...
These packages can be upgraded:
package installed upgraded
@vue/cli-plugin-babel N/A → ^4.0.5
@vue/cli-plugin-e2e-nightwatch N/A → ^4.0.5
@vue/cli-plugin-eslint N/A → ^4.0.5
@vue/cli-plugin-unit-jest N/A → ^4.0.5
@vue/cli-service N/A → ^4.0.5
The text was updated successfully, but these errors were encountered:
I am experiencing the same problem
check Codes
because function getInstalledVersion is read path.resolve(this.context, 'node_modules', packageName) package.json
so before vue upgrade you can do npm install or yarn install , it's work
Version
4.0.5
Reproduction link
https://github.com/reproducing/vue-cli-upgrade-yarn-workspaces
Environment info
Steps to reproduce
yarn
globally@vue/cli 4.0.5
globallyrepo/a
orrepo/b
vue upgrade
What is expected?
Should upgrade without errors
What is actually happening?
It doesn't find the
vue-cli
packages frompackage.json
Running
vue upgrade @vue/cli-service
works, but it adds a duplicate@vue/cli-service
entry inpackage.json
, so it still doesn't see the original entry.@vue/cli 3.12.1
seems to be affected as well, even though it doesn't throw an error:The text was updated successfully, but these errors were encountered: