Search code examples
vue.jsnpmdependenciesvuejs3

Peer dependency missing Vue 3


Whenever i run npm list -g --depth=0 command in cmd. I got this error from npm.

+-- @vue/cli@4.5.6
+-- typescript@4.0.3
`-- vue@3.0.0

npm ERR! peer dep missing: vue@3.0.0, required by @vue/compiler-sfc@3.0.0

I have tried different methods to fix this error.

I have also tried uninstalling and installing these packages.

I have also completely uninstalled node and installed it again following this guide. After re-installing the packages, I still get this error.

Anyway to fix this error?


Solution

  • To fix this problem, Upgrade your Nodejs to 15.5.1 & npm to 7.4.0. After upgrading, Use npm list -g --depth=0 to check the error. The error will have disappeared.