Skip to content

fix: remove missing PaymentMode and Taxes model references from setup script#1435

Open
towfeeqkhan wants to merge 1 commit into
salahlalami:masterfrom
towfeeqkhan:fix/setup-script-missing-models
Open

fix: remove missing PaymentMode and Taxes model references from setup script#1435
towfeeqkhan wants to merge 1 commit into
salahlalami:masterfrom
towfeeqkhan:fix/setup-script-missing-models

Conversation

@towfeeqkhan

Copy link
Copy Markdown

Bug

Running npm run setup fails due to missing models:

Cannot find module '../models/appModels/PaymentMode'
Cannot find module '../models/appModels/Taxes'

These models are referenced in src/setup/setup.js but do not exist in:

backend/src/models/appModels/

This prevents contributors from completing the initial project setup locally.

Fix

Removed invalid imports and related insert operations for:

  • PaymentMode
  • Taxes

These models are not present in backend/src/models/appModels/, so removing the references restores setup functionality without affecting runtime logic.

The setup script now completes successfully and creates:

  • Admin user
  • Default settings

Steps to reproduce

  1. Clone the repository
  2. Navigate to the backend folder
  3. Run npm install
  4. Run npm run setup

Before fix:

Setup fails with MODULE_NOT_FOUND error for PaymentMode and Taxes.

After fix:

Setup completes successfully without errors.

Screenshots

Before fix

err1

After fix

er2

Fixes #1434

Additional note

The setup controller (src/controllers/coreControllers/setup.js) also references these models and may require a similar update. I can submit a follow-up PR if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm run setup fails with MODULE_NOT_FOUND for PaymentMode model

1 participant