Skip to content

npm run setup fails with MODULE_NOT_FOUND for PaymentMode model #1434

Description

@OmAkolkar12

Describe the bug
When running npm run setup in the backend directory, the setup
partially completes (Admin and Settings are created successfully)
but then crashes with a MODULE_NOT_FOUND error for PaymentMode model.

To Reproduce

  1. Clone the repository
  2. Set up MongoDB URI in backend/.env
  3. Run: cd backend
  4. Run: npm install
  5. Run: npm run setup
  6. See error

Expected behavior
Setup script should complete fully without any errors.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: N/A (this is a backend/terminal issue)
  • Version: idurar-erp-crm v4.1.0

Smartphone (please complete the following information):
N/A

Additional context
Full error log:

Error: Cannot find module '../models/appModels/PaymentMode'
Require stack:

  • backend\src\setup\setup.js

Node.js v24.11.0
npm v11.6.2

The file PaymentMode.js does not appear to exist under
backend/src/models/appModels/ directory. The setup.js script
references it but the model file is missing from the repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions