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
- Clone the repository
- Set up MongoDB URI in backend/.env
- Run: cd backend
- Run: npm install
- Run: npm run setup
- See error
Expected behavior
Setup script should complete fully without any errors.
Screenshots
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.
Describe the bug
When running
npm run setupin the backend directory, the setuppartially completes (Admin and Settings are created successfully)
but then crashes with a MODULE_NOT_FOUND error for PaymentMode model.
To Reproduce
Expected behavior
Setup script should complete fully without any errors.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
N/A
Additional context
Full error log:
Error: Cannot find module '../models/appModels/PaymentMode'
Require stack:
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.