Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
- Git for version control
Recommended IDE Setup
For the best development experience, we recommend:VSCode + Volar ExtensionInstall VSCode with the Volar extension for Vue 3 support.If you have Vetur installed, make sure to disable it to avoid conflicts.
Installation Steps
Install dependencies
Install all required npm packages:This will install the following key dependencies:
- Vue 3 (^3.5.13) - The progressive JavaScript framework
- Vue Router (^4.5.0) - Official router for Vue.js
- Pinia (^2.3.1) - State management for Vue
- Axios (^1.7.9) - HTTP client for API requests
- Vite (^6.0.5) - Next generation frontend tooling
Available Scripts
The following npm scripts are available inpackage.json:
Script Descriptions
npm run dev- Starts the Vite development server with hot module replacement (HMR)npm run build- Builds the application for production with optimizationsnpm run preview- Locally preview the production build
Project Structure
Once set up, your project structure will look like this:Vite Configuration
The project uses Vite with the following configuration (vite.config.js):
Key Configuration Features
- Vue Plugin: Enables Vue 3 single-file component support
- Vue DevTools: Integrated browser DevTools for Vue debugging
- Path Alias:
@is aliased to thesrc/directory for cleaner imports
Development Tools
The project includes vite-plugin-vue-devtools (^7.6.8) which provides an enhanced debugging experience during development.
Next Steps
Now that your environment is set up:- Explore the PokeAPI Integration to understand how data is fetched
- Learn about Building and Deployment when you’re ready to deploy
- Review the source code in
src/to understand the application structure
Troubleshooting
Common Issues
- Module not found errors: Run
npm installagain to ensure all dependencies are installed - Volar not working: Make sure to disable the Vetur extension if installed
- Port already in use: Vite will automatically select another port or you can specify one in
vite.config.js