search

Home  >  Q&A  >  body text

How to solve the Vue package version mismatch error encountered when installing Nuxt.js

<p>I'm trying to install Nuxt.js v3.4.2 using the command npx nuxt init nuxt3-demo and then running npm install. However, I encountered the following error message: </p> <pre class="brush:php;toolbar:false;">ERROR: Vue packages version mismatch: - vue@3.2.40 - vue-server-renderer@2.7.10 This may cause things to work incorrectly. Make sure to use the same version for both.</pre> <p>I've tried updating the 'vue' package but that didn't fix the issue. My package.json file is as follows: </p> <pre class="brush:php;toolbar:false;">{ "name": "nuxt-app", "private": true, "scripts": { "build": "nuxt build", "dev": "nuxt dev", "generate": "nuxt generate", "preview": "nuxt preview", "postinstall": "nuxt prepare" }, "devDependencies": { "@types/node": "^18", "nuxt": "^3.4.2" } }</pre> <p>Can anyone provide a solution to this error? </p>
P粉195200437P粉195200437545 days ago627

reply all(1)I'll reply

  • P粉111927962

    P粉1119279622023-08-31 00:29:04

    As a solution, you can:

    1 - After deleting the "node_modules" folder and the "package-lock.json" file, try npm install.

    2 - Try yarn install.

    3 - Try the new version v3.4.3.

    I edited because, as Wongjn said, I asked for clarification. However, given the nature of the problem and the difficulty of replicating it, it would be nice to provide a minimal reproducible example.

    reply
    0
  • Cancelreply