Cursor api

Import Paths Broken After File Reorganization

After Cursor moved or reorganized your source files, many import statements are broken. The build fails because modules can't be found or import paths are incorrect.

Relative paths didn't get updated when files moved.

Error Messages You Might See

Cannot find module '../utils' MODULE_NOT_FOUND Cannot find name 'UserService' ERROR in compilation
Cannot find module '../utils'MODULE_NOT_FOUNDCannot find name 'UserService'ERROR in compilation

Common Causes

  1. Relative import paths not updated after file move (../controller/user.js no longer valid)
  2. Absolute path imports assuming old directory structure
  3. Circular dependencies created by file reorganization
  4. Index.js file with re-exports removed during cleanup
  5. tsconfig paths configuration doesn't match new structure

How to Fix It

Use absolute imports with path aliases if possible: import {User} from '@/models/User' with tsconfig "paths": {"@/*": ["src/*"]}. Or carefully count directory depth for relative: import {a} from '../../../utils'. Use IDE's auto-refactor on move.

Real developers can help you.

prajwalfullstack prajwalfullstack Hi Im a full stack developer, a vibe coded MVP to Market ready product, I'm here to help Krishna Sai Kuncha Krishna Sai Kuncha Experienced Professional Full stack Developer with 8+ years of experience across react, python, js, ts, golang and react-native. Developed inhouse websearch tooling for AI before websearch was solved : ) Jaime Orts-Caroff Jaime Orts-Caroff I'm a Senior Android developer, open to work in various fields Yovel Cohen Yovel Cohen I got a lot of experience in building Long-horizon AI Agents in production, Backend apps that scale to millions of users and frontend knowledge as well. Caio Rodrigues Caio Rodrigues I'm a full-stack developer focused on building practical and scalable web applications. My main experience is with **React, TypeScript, and modern frontend architectures**, where I prioritize clean code, component reusability, and maintainable project structures. I have strong experience working with **dynamic forms, state management (Redux / React Hook Form), and complex data-driven interfaces**. I enjoy solving real-world problems by turning ideas into reliable software that companies can actually use in their daily operations. Beyond coding, I care about **software quality and architecture**, following best practices for componentization, code organization, and performance optimization. I'm also comfortable working across the stack when needed, integrating APIs, handling business logic, and helping transform prototypes into production-ready systems. My goal is always to deliver solutions that are **simple, efficient, and genuinely useful for the people using them.** BurnHavoc BurnHavoc Been around fixing other peoples code for 20 years. Victor Denisov Victor Denisov Developer Matthew Jordan Matthew Jordan I've been working at a large software company named Kainos for 2 years, and mainly specialise in Platform Engineering. I regularly enjoy working on software products outside of work, and I'm a huge fan of game development using Unity. I personally enjoy Python & C# in my spare time, but I also specialise in multiple different platform-related technologies from my day job. Kingsley Omage Kingsley Omage Fullstack software engineer passionate about AI Agents, blockchain, LLMs. zipking zipking I am a technologist and product builder dedicated to creating high-impact solutions at the intersection of AI and specialized markets. Currently, I am focused on PropScan (EstateGuard), an AI-driven SaaS platform tailored for the Japanese real estate industry, and exploring the potential of Archify. As an INFJ-T, I approach development with a "systems-thinking" mindset—balancing technical precision with a deep understanding of user needs. I particularly enjoy the challenge of architecting Vertical AI SaaS and optimizing Small Language Models (SLMs) to solve specific, real-world business problems. Whether I'm in a CTO-level leadership role or hands-on with the code, I thrive on building tools that turn complex data into actionable value.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help

Related Cursor Issues

Can't fix it yourself?
Real developers can help.

You don't need to be technical. Just describe what's wrong and a verified developer will handle the rest.

Get Help