Skip to content

Backend build fails due to incorrect TypeScript rootDir configuration #43

@Himanshu4812

Description

@Himanshu4812

🐞 Bug Description

The backend fails to build with TypeScript error TS6059 because tsconfig.json sets rootDir to src, but source files are located in routes/, models/, and middleware directories outside src.

📍 Steps to Reproduce

  1. cd backend
  2. npm install
  3. npm run build

❌ Actual Behavior

TypeScript throws multiple TS6059 errors indicating files are outside the configured rootDir.

✅ Expected Behavior

Backend should compile successfully, or project structure / tsconfig should be aligned.

📸 Screenshots

Image

🖥️ Device & Environment

  • OS: Windows
  • Browser: Chrome
  • Branch: main

💡 Possible fixes:

  • Move routes/models/middleware inside src/, or
  • Update tsconfig.json rootDir / include configuration

This would also align the README instructions (npm start), which are currently non-functional.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions