Benjamin Smith Max
Benjamin Smith Max

Reputation: 2748

Mismatch vue package error in nuxtjs

I am getting an error while trying to run my project on dev mode.

user@Apples-MacBook-Pro myproject (hotfix/carousel-2) $ npm run dev

> [email protected] dev /Users/user/nuxt-projects/myproject
> nuxt

/Users/user/nuxt-projects/myproject/node_modules/vue-server-renderer/index.js:8
  throw new Error(
  ^

Error: 

Vue packages version mismatch:

- [email protected]
- [email protected]

I tried deleting the node_modules directory and re-run npm insatll, but still getting the same error. Could you please point me to the right direction?

Upvotes: 0

Views: 5799

Answers (3)

Ruchir
Ruchir

Reputation: 1068

npm audit fix --force 

This command is the quick fix for your question

Upvotes: 0

Anima-t3d
Anima-t3d

Reputation: 3565

Eventually I got it to work by using:

  1. rm -rf node_modules/ // Removes node_modules folder
  2. rm -rf package-lock.json && npm cache clean --force //Removes package-lock file and cleans cache forcefully (npm v5+)
  3. npm install // do a fresh install

Thanks @luiseok

Upvotes: 0

luiseok
luiseok

Reputation: 21

I solved same problem with deleting cache files and package lock files.

rm -rf package-lock.json && npm cache clean

If you used yarn instead of npm, then

rm -rf yarn.lock && yarn cache clean

After removing lock files, install again

npm install

OR

yarn install --network-timeout 600000

Later, it might solve same problems.

Upvotes: 2

Related Questions