You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行npm create nuxt-app命令默认安装Nuxt 2时,如何安装Nuxt 3版本Vue应用

How to Install Nuxt 3 Using npm Commands

Ah, I get it—you're running into confusion because the create-nuxt-app package is exclusively for setting up Nuxt 2 projects. That's why no matter what version tag you add to that command, it'll still spin up a Nuxt 2 app. Nuxt 3 uses a completely different set of initialization tools, so let's fix that:

Correct Commands for Nuxt 3

1. Install the Latest Stable Nuxt 3 Version

You have two straightforward options here:

  • Using Nuxt's official CLI tool nuxi:
    npx nuxi init mousa
    
  • Using npm's create shortcut (points to the official nuxt package):
    npm create nuxt@latest mousa
    

2. Install a Specific Nuxt 3 Version

If you need a particular version (e.g., 3.8.0), just append the version tag to the command:

  • With nuxi:
    npx nuxi@3.8.0 init mousa
    
  • With npm create:
    npm create nuxt@3.8.0 mousa
    

Post-Creation Steps

Once the project is initialized, don't forget to:

  • Navigate into your project folder:
    cd mousa
    
  • Install dependencies:
    npm install
    
  • Start the development server:
    npm run dev
    

A quick note: The old create-nuxt-app tool is now deprecated for Nuxt 3, so you'll want to stick to the commands above for all new Nuxt 3 projects.

内容的提问来源于stack exchange,提问作者Mohammad Ghiasvand

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.27 14:03:11