Before creating Vue applications, you need to set up your development environment. Vue uses modern JavaScript tooling powered by Vite, a next-generation build tool that offers an incredibly fast development experience.
Prerequisites
To develop with Vue 3.5+, you need:
- Node.js 18.3 or higher (we recommend the latest LTS version)
- A modern code editor (VS Code, Cursor, or WebStorm)
- A terminal application
Step 1: Install Node.js
On macOS
Using the official installer:
- Download from https://nodejs.org (LTS version)
- Run the installer
Or using Homebrew:
bashbrew install node
On Windows
- Download from https://nodejs.org (LTS version)
- Run the installer
- Check "Add to PATH" during installation
On Linux (Ubuntu/Debian)
bashcurl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs
Verify Installation
bashnode --version # v20.x.x or higher npm --version # 10.x.x or higher
Step 2: Choose a Package Manager
Vue works with any package manager. We recommend pnpm for its speed and disk efficiency:
bash# Install pnpm globally npm install -g pnpm # Verify pnpm --version
Alternatives:
- npm: Comes with Node.js (no extra installation)
- yarn:
npm install -g yarn - bun: Download from https://bun.sh
Step 3: Set Up Your Code Editor
VS Code / Cursor (Recommended)
Install these essential extensions:
-
Vue - Official (formerly Volar)
- IntelliSense for Vue SFCs
- Syntax highlighting
- Type checking in templates
-
TypeScript Vue Plugin
- Better TypeScript support in Vue files
-
ESLint
- Code quality and consistency
-
Prettier
- Code formatting
WebStorm / IntelliJ IDEA
Vue support is built-in. Just ensure you have:
- Vue.js plugin enabled
- TypeScript support enabled
Step 4: Install Vue DevTools
Vue DevTools is a browser extension for debugging Vue applications:
- Chrome: Vue.js devtools
- Firefox: Vue.js devtools
- Edge: Vue.js devtools
Vue DevTools allows you to:
- Inspect component hierarchy
- View and edit component state
- Track events and mutations
- Debug performance issues
Editor Configuration
Create a .vscode/settings.json file for consistent settings:
json{ "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "[vue]": { "editor.defaultFormatter": "Vue.volar" }, "typescript.tsdk": "node_modules/typescript/lib" }
Troubleshooting
"node: command not found"
Restart your terminal after installing Node.js, or add Node to your PATH manually.
Permission errors on macOS/Linux
Don't use sudo with npm. Fix permissions:
bashmkdir ~/.npm-global npm config set prefix '~/.npm-global' # Add to ~/.bashrc or ~/.zshrc: export PATH=~/.npm-global/bin:$PATH
Node.js version too old
Use nvm (Node Version Manager) to manage multiple versions:
bashcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install --lts nvm use --lts