# [vite] Internal server error: Failed to resolve import "x" from "src/App.jsx". Does the file exist?

**Code:** `Vite failed to resolve import` · **Category:** React · **Seen on:** React

Vite couldn’t find an imported file or package.

## Meaning

Wrong relative path, case mismatch, path alias not configured in vite.config, or package not installed.

## Common causes

- Wrong relative path or file extension
- Alias (@/) defined in tsconfig but not in vite.config
- Package not installed
- Case mismatch on Linux CI

## Quick fix

1. Fix the path or install the package
2. Add resolve.alias in vite.config (or vite-tsconfig-paths)
3. Match file name case exactly

## Detailed fix by platform

### React

1. `resolve: { alias: { '@': path.resolve(__dirname, 'src') } }`

## How to diagnose

1. **Import** — Which specifier?
2. **Alias** — Configured in Vite?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/react/vite-failed-to-resolve-import)
