vue-cli icon indicating copy to clipboard operation
vue-cli copied to clipboard

At least one dependency can't be found. Which dependency?

Open dkattan opened this issue 3 years ago • 4 comments

What problem does this feature solve?

When upgrading Vue you may get an error stating a dependency can't be found, but it doesn't tell you which one. In my case it ended up being @vue/cli-plugin-babel

https://github.com/vuejs/vue-cli/blob/f7dc46d0692c2d8a07f5c8b0580177de81c150b0/packages/%40vue/cli/lib/Upgrader.js#L160

image

We should include the name of the dependency in the log output.

What does the proposed API look like?

This isn't really an API, it's just better logging/exception handling

dkattan avatar Mar 10 '22 13:03 dkattan

Does anyone have an update on this issue? I'm stuck upgrading a project from vue 2 - 3 :(

ceoger avatar May 11 '22 23:05 ceoger

npm un -g @vue/cli
nvm use 14
rm -rf node_modules
npm install
npm install -g @vue/cli
vue upgrade

tsulatsitamim avatar Aug 27 '22 00:08 tsulatsitamim

This also happens when using yarn PnP, becuase it tries to look for a node_modules folder, which does not exist.

This was my workaround:

  1. Change nodeLinker: pnp to nodeLinker: node-modules in .yarnrc.yml
  2. yarn cache clean
  3. yarn install
  4. vue upgrade
  5. Change nodeLinker: node-modules to nodeLinker: pnp in .yarnrc.yml
  6. rm -rf node_mdules
  7. yarn install

rudolfbyker avatar Oct 25 '22 07:10 rudolfbyker

I just did npm install then I can do vue upgrade.

kokiok3 avatar Sep 18 '23 06:09 kokiok3