on-internet
← Community

Vite + React + TypeScript failing to resolve @/components import path

Stack Overflow ·

I'm working on a React + TypeScript project using Vite. When I run npm run dev, I get an import resolution error: Error: Failed to resolve import "@/components/layout/AppLayout" Project details: Framework: React + TypeScript Build tool: Vite OS: Windows Node version: 18+ I tried: Checked that the file exists Restarted dev server Verified folder structure Folder structure Folder layout: src/ components/ layout/ AppLayout.tsx pages/ CheckoutPage.tsx

Comments

Sign in or sign up to comment and upvote.

No comments yet.