Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue packages version mismatch #6823

Closed
phillipstemann opened this issue Dec 23, 2019 · 29 comments
Closed

Vue packages version mismatch #6823

phillipstemann opened this issue Dec 23, 2019 · 29 comments

Comments

@phillipstemann
Copy link

phillipstemann commented Dec 23, 2019

Version

v2.11.0

Reproduction link

https://iDontHaveItOnline.com

Steps to reproduce

I updated to the newest version of Nuxt.js and now I get this error.

Vue packages version mismatch:

  • vue@2.6.10
  • vue-server-renderer@2.6.11

This may cause things to work incorrectly. Make sure to use the same version for both.

Vue packages version mismatch:

  • vue@2.6.10
  • vue-server-renderer@2.6.11

This may cause things to work incorrectly. Make sure to use the same version for both.

at Object. (node_modules/vue-server-renderer/index.js:8:9)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (node_modules/@nuxt/vue-renderer/dist/vue-renderer.js:20:27)
at Module._compile (internal/modules/cjs/loader.js:778:30)

╭────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
│ │
│ Error: │
│ │
│ Vue packages version mismatch: │
│ │
│ - vue@2.6.10 │
│ - vue-server-renderer@2.6.11 │
│ │
│ This may cause things to work incorrectly. Make sure to use the same version for both. │
│ │
│ │

What is expected ?

It is expected to compile the code.

What is actually happening?

But instead it crashes with a fatal error.

@ghost ghost added the cmty:bug-report label Dec 23, 2019
@manniL
Copy link
Member

manniL commented Dec 23, 2019

That's a typical userland error.

There are various solutions: yarn upgrade / npm update / remove lock files + yarn or npm i

@manniL manniL closed this as completed Dec 23, 2019
@daniplaninc
Copy link

The thing that works for me is:

  • remove the lock file (package-lock.json)
  • delete the node_modules folder (this is a mandatory step for me)
  • run npm i

I am using Windows and Node 12.14.0

jbratcher added a commit to jbratcher/nuxt-netlify-cms-starter-kit that referenced this issue Jan 21, 2020
@jasperf
Copy link

jasperf commented Apr 1, 2020

Have the same issue:

Error: 
Vue packages version mismatch:
- vue@2.6.10
- vue-server-renderer@2.6.11

But the package-lock.json is loading 2.6.10 for Vue and the Vue Server Renderer

...
"vue": "^2.6.10",
 "vue-loader": "^15.7.1",
"vue-router": "^3.1.3",
"vue-server-renderer": "^2.6.10",
"vue-template-compiler": "^2.6.10",
...

So how would this be possible?

@muhammadali7768
Copy link

muhammadali7768 commented Aug 22, 2020

The thing that works for me is:

* remove the lock file (package-lock.json)

* delete the node_modules folder (this is a mandatory step for me)

* run npm i

I am using Windows and Node 12.14.0

This worked for me. thanks

@dialogik
Copy link

dialogik commented Sep 2, 2020

Npm suggested to me to run npm audit fix to fix 2 vunerabilities and after that I got the same error.

Exactly the same here. A simple npm update fixed it. (No need to remove lock file or delete node_modules folder).

@seanchen
Copy link

seanchen commented Sep 4, 2020

I go the save issue after execute npm audit fix. And it is fixed by running npm update.

@aurelianoa
Copy link

The thing that works for me is:

  • remove the lock file (package-lock.json)
  • delete the node_modules folder (this is a mandatory step for me)
  • run npm i

I am using Windows and Node 12.14.0

This worked for me. Thanks!

@oxavibes
Copy link

The solution is to run npm update after an npm audit fix

@julieYang2012
Copy link

The thing that works for me is:

* remove the lock file (package-lock.json)

* delete the node_modules folder (this is a mandatory step for me)

* run npm i

I am using Windows and Node 12.14.0

This worked for me. thanks

@elliottregan
Copy link

If it helps anyone else who lands here, I had to also clean my npm cache along with the above tips.

npm cache clean --force

@dseeker
Copy link

dseeker commented Jun 7, 2021

it just happened to me since about 1 hour ago a new patch version was release
I'm deploying via Serverless Pro, so it does build step: npm ci --if-present --unsafe-perm with a fresh node_modules folder

FATAL
Vue packages version mismatch:
- vue@2.6.14
- vue-server-renderer@2.6.13
This may cause things to work incorrectly. Make sure to use the same version for both.
Vue packages version mismatch:
- vue@2.6.14
- vue-server-renderer@2.6.13
This may cause things to work incorrectly. Make sure to use the same version for both.
at Object.<anonymous> (node_modules/vue-server-renderer/index.js:8:9)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at Module._require.i.require (serverless_sdk/index.js:9:73397)
at Module._require.i.require (serverless_sdk/index.js:9:73397)
at Module._require.i.require (serverless_sdk/index.js:9:73397)
at require (internal/modules/cjs/helpers.js:74:18)

both vue and vue-server-renderer were set to 2.6.13 in the package.json version, but for some reason vue still updated the patch version

@CyberPunk10
Copy link

CyberPunk10 commented Jun 15, 2021

npm i -D vue-template-compiler
  • This will update the package correctly.
  • The build will be assembled correctly on heroku.

@eugenio-tesio
Copy link

I go the save issue after execute npm audit fix. And it is fixed by running npm update.

This worked for me.

My issue

Vue packages version mismatch: 
 - vue@2.6.14
 - vue-server-renderer@2.6.12 

@samalapsy
Copy link

samalapsy commented Jun 18, 2021

I had this issue

Vue packages version mismatch: 
 - vue@2.6.12
 - vue-server-renderer@2.6.14
 -  This may cause things to work incorrectly. Make sure to use the same version for both.

HOW I FIXED IT

  • removed package-locked.json
  • deleted node_modules
  • ran the following npm install and npm audit fix then npm update. npm update was actually the game changer for me.

@lampewebdev
Copy link

lampewebdev commented Jun 28, 2021

   ╭────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                            │
   │   ✖ Nuxt Fatal Error                                                                       │
   │                                                                                            │
   │   Error:                                                                                   │
   │                                                                                            │
   │   Vue packages version mismatch:                                                           │
   │                                                                                            │
   │   - vue@2.6.12                                                                             │
   │   - vue-server-renderer@2.6.14                                                             │
   │                                                                                            │
   │   This may cause things to work incorrectly. Make sure to use the same version for both.   │
   │                                                                                            │
   │                                                                                            │
   ╰────────────────────────────────────────────────────────────────────────────────────────────╯

I'm still getting the error even after running:

rm -rf node_modules/ package-lock.json;
npm cache clean --force;
npm i ; npm audit fix; npm update;

@onipiing
Copy link

   ╭────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                            │
   │   ✖ Nuxt Fatal Error                                                                       │
   │                                                                                            │
   │   Error:                                                                                   │
   │                                                                                            │
   │   Vue packages version mismatch:                                                           │
   │                                                                                            │
   │   - vue@2.6.12                                                                             │
   │   - vue-server-renderer@2.6.14                                                             │
   │                                                                                            │
   │   This may cause things to work incorrectly. Make sure to use the same version for both.   │
   │                                                                                            │
   │                                                                                            │
   ╰────────────────────────────────────────────────────────────────────────────────────────────╯

I'm still getting the error even after running:

rm -rf node_modules/ package-lock.json;
npm cache clean --force;
npm i ; npm audit fix; npm update;

I got the same error and fixed by upgrading vue version upto 2.6.14

@techniath
Copy link

I tried all the above solutions and nothing worked for me.
Eventually I got it working by doing npm install --legacy-peer-deps

@waziaq
Copy link

waziaq commented Aug 24, 2021

I tried all the above solutions and nothing worked for me.
Eventually I got it working by doing npm install --legacy-peer-deps

Still not work for me.

@MSkred
Copy link

MSkred commented Sep 7, 2021

I tried all the above solutions and nothing worked for me.

@shakir-abdo
Copy link

I tried all the above solutions and nothing worked for me.

Please try this solution, but in order
it's the only one worked for me ..
#6823 (comment)

@ugurcanalyuz
Copy link

ugurcanalyuz commented Jul 4, 2022

  Error:                                                                                   
   │                                                                                            
   │   Vue packages version mismatch:                                                           
   │                                                                                            
   │   - vue@2.6.14                                                                             
   │   - vue-server-renderer@2.7.1                                                              
   │                                                                                          
   │   This may cause things to work incorrectly. Make sure to use the same version for both. 

FIX: npm i vue-server-renderer@2.6.14

@volcanioo
Copy link

The solution is to run npm update after an npm audit fix

This worked for me! 🎉

@JHerwig
Copy link

JHerwig commented Jul 13, 2022

I have found another solution.
It seems as would package dependencies install the latest version. In my case vue-debounce@4.0.0 installed vue@3.2.37. I have installed vue@2.7.5 manually and this Vue packages version mismatch error is gone.

@gtm-agency
Copy link

Hello, same here but nothing worked

Vue packages version mismatch:

  • vue@2.6.14
  • vue-server-renderer@2.7.5

This may cause things to work incorrectly. Make sure to use the same version for both.

Vue packages version mismatch:

  • vue@2.6.14
  • vue-server-renderer@2.7.5

@Chitzi
Copy link

Chitzi commented Jul 15, 2022

Solved it with

  "overrides": {
    "vue": "2.7.6",
    "vue-server-renderer": "2.7.6"
  }

in package.json

@amitleuva1987
Copy link

npm i vue-server-renderer@2.6.14

This worked for me

@deannabosschert
Copy link

npm update or npm audit fix didn't do anything for me either, same with deleting/reinstalling package-lock and node_modules.

howeverrr, running the following two commands worked for me!

npm i vue-template-compiler@2.6.14
npm i vue-server-renderer@2.6.14

@mbarsil
Copy link

mbarsil commented Sep 18, 2022

Hey all, after trying ALL the solutions proposed here, the only thing that worked for me was to manually reinstall the specific version that I had troubles with, both for vue-server-renderer and vue-template-compiler:

image
image

In this case I ran:

npm i --save vue-server-renderer@2.6.14
npm i --save vue-template-compiler@2.6.14

Hope this might help the ones still having the issue

@danielroe
Copy link
Member

@tdebenne You are likely using a dependency that is still using Vue 2. It's not the same as this issue. Also, Nuxt 3 issues can be reported at https://github.com/nuxt/framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests