Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 16.x or higher recommended
npm
Comes bundled with Node.js
Git
For cloning the repository
Code Editor
VSCode recommended with Volar extension
Installation Steps
Verify Node.js Installation
First, verify that Node.js and npm are installed correctly:You should see version numbers for both commands. If not, download and install Node.js.
Clone the Repository
Clone the Pokedex Vue 3 repository to your local machine:
Replace
<repository-url> with the actual repository URL. The project folder is named “router”.Install Dependencies
Install all required npm packages:This will install all dependencies listed in
package.json, including:- Vue 3 (^3.5.13): Core framework
- Vue Router (^4.5.0): Routing solution
- Pinia (^2.3.1): State management
- Axios (^1.7.9): HTTP client
- Vite (^6.0.5): Build tool
- Vue DevTools (^7.6.8): Development tools
Project Structure
After installation, your project structure should look like this:Configuration Files
Vite Configuration
The project uses Vite as its build tool. Here’s the configuration fromvite.config.js:
vite.config.js
The
@ alias is configured to point to the src/ directory, allowing you to use @/components/... instead of relative paths.Application Entry Point
The main application setup insrc/main.js:
src/main.js
Troubleshooting
npm install fails
npm install fails
If you encounter errors during installation:
- Clear npm cache:
npm cache clean --force - Delete
node_modulesandpackage-lock.json - Run
npm installagain
Port already in use
Port already in use
If the default Vite port (5173) is already in use, Vite will automatically try the next available port. You can also specify a custom port in
vite.config.js:Volar extension not working
Volar extension not working
Make sure:
- You’ve disabled the Vetur extension if installed
- You’ve reloaded VSCode after installing Volar
- The workspace is using the correct TypeScript version
Next Steps
Now that you have everything installed, you’re ready to run the application!Quick Start Guide
Learn how to run the development server and build for production