Vue packages version mismatch: why does @nuxt/vue-renderer 2.15.8 install vue-server-renderer@2.7.10?

Viewed 10

I have a packages version mismatch that I don't understand how to fix.

When I do:

rm -rf node_modules package-lock.json 
npm install
npm run dev

I'm getting the following error:

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

So, I checked what was installing vue-server-renderer@2.7.10 using npm-tree, and I'm getting this dependencies tree:

├─┬ nuxt 2.15.8
│ └─┬ @nuxt/vue-renderer 2.15.8
│   ├── vue-server-renderer 2.7.10

Why would @nuxt/vue-renderer install vue-server-renderer 2.7.10 instead of 2.15.8 ?

And how can I fix it ?

package.json:

{
  "name": "my project",
  "version": "1.3.0",
  "description": "my project description",
  "author": "John",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate",
    "lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
    "lint": "npm run lint:js"
  },
  "dependencies": {
    "@nuxtjs/auth-next": "^5.0.0-1648802546.c9880dc",
    "@nuxtjs/axios": "^5.13.6",
    "@nuxtjs/markdownit": "^2.0.0",
    "@nuxtjs/proxy": "^2.1.0",
    "core-js": "^3.25.2",
    "echarts": "^5.3.3",
    "jshint": "^2.13.5",
    "lodash": "^4.17.21",
    "nuxt": "^2.15.8",
    "nuxt-highlightjs": "^1.0.3",
    "nuxt-leaflet": "^0.0.27",
    "vue-echarts": "^6.2.3",
    "xlsx": "^0.18.5"
  },
  "devDependencies": {
    "@nuxt/types": "^2.15.8",
    "@nuxt/typescript-build": "^2.1.0",
    "@nuxtjs/composition-api": "^0.32.0",
    "@nuxtjs/date-fns": "^1.5.0",
    "@nuxtjs/vuetify": "^1.12.3",
    "eslint": "^8.23.1",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-nuxt": "4.0.0",
    "eslint-plugin-prettier": "^4.2.1",
    "eslint-plugin-vue": "^9.5.1",
    "prettier": "^2.7.1"
  }
}
0 Answers
Related