1

I am trying to npm run dev my nuxt js vue3 project. And I get error: enter image description here

My package.json:

{
  "name": "my-project",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "dev": "nuxt",
    "build": "nuxt build",
    "start": "nuxt start",
    "generate": "nuxt generate"
  },
  "dependencies": {
    "core-js": "^3.25.3",
    "nuxt": "^2.15.8",
    "vue": "^3.0.0-rc.8",
    "vue-server-renderer": "^2.7.14",
    "vue-template-compiler": "^2.7.10"
  },
  "devDependencies": {
    "node-sass": "^8.0.0",
    "sass-loader": "^13.2.0"
  }
}

How make it work in compatibility?

1 Answer 1

2

You should probably replace

vue-server-renderer+ vue-template-compiler

by

@vue/compiler-sfc + @vue/server-renderer

Also, I'm not sure why you're using an RC version for Vue3, use the latest aka v3.2.45 at the time of writing.

As for Nuxt, Nuxt2 is aimed towards usage with Vue2.
Nuxt's latest stable version for Vue3 is v3.0.0.


At that point, if you are starting a new project, consider using the CLI for such a purpose (don't forget to respect the prerequisites).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.