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

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.

Kingsley Omage Kingsley Omage Fullstack software engineer passionate about AI Agents, blockchain, LLMs. Franck Plazanet Franck Plazanet I am a Strategic Engineering Leader with over 8 years of experience building high-availability enterprise systems and scaling high-performing technical teams. My focus is on bridging the gap between complex technology and business growth. Core Expertise: šŸš€ Leadership: Managing and coaching teams of 15+ engineers, fostering a culture of accountability and continuous improvement. šŸ—ļø Architecture: Enterprise Core Systems, Multi-system Integration (ERP/API/ETL), and Core Database Structure. ā˜ļø Cloud & Scale: AWS Expert; architected systems handling 10B+ monthly requests and managing 100k+ SKUs. šŸ“ˆ Business Impact: Aligning tech strategy with P&L goals to drive $70k+ in monthly recurring revenue. I thrive on "out-of-the-box" thinking to solve complex technical bottlenecks and am always looking for ways to use automation to improve business productivity. PawelPloszaj PawelPloszaj I'm fronted developer with 10+ years of experience with big projects. I have small backend background too Jen Jacobsen Jen Jacobsen I’m a Full-Stack Developer with over 10 years of experience building modern web and mobile applications. I enjoy working across the full product lifecycle — turning ideas into real, well-built products that are intuitive for users and scalable for businesses. I particularly enjoy building mobile apps, modern web platforms, and solving complex technical problems in a way that keeps systems clean, reliable, and easy to maintain. Tejas Chokhawala Tejas Chokhawala Full-stack engineer with 5 years experience building production web apps using React, Next.js and TypeScript. Focused on performance, clean architecture and shipping fast. Experienced with Supabase/Postgres backends, Stripe billing, and building AI-assisted developer tools. Mehdi Ben Haddou Mehdi Ben Haddou - Founder of Chessigma (1M+ users) & many small projects - ex Founding Engineer @Uplane (YC F25) - ex Software Engineer @Amazon and @Booking.com MFox MFox Full-stack professional senior engineer (15+years). Extensive experience in software development, qa, and IP networking. Omar Faruk Omar Faruk As a Product Engineer at Klasio, I contributed to end-to-end product development, focusing on scalability, performance, and user experience. My work spanned building and refining core features, developing dynamic website templates, integrating secure and reliable payment gateways, and optimizing the overall system architecture. I played a key role in creating a scalable and maintainable platform to support educators and learners globally. I'm enthusiastic about embracing new challenges and making meaningful contributions. Antriksh Narang Antriksh Narang 5 years+ Experienced Dev (Specially in Web Development), can help in python, javascript, react, next.js and full stack web dev technologies. Dor Yaloz Dor Yaloz SW engineer with 6+ years of experience, I worked with React/Node/Python did projects with React+Capacitor.js for ios Supabase expert

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

Get Help

Frequently Asked Questions

What's a circular dependency?

A imports B, B imports A. Causes module loading issues. Break with interfaces or separate module.

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