Skip to content

run --local --watch: a hot reload after a model change leaves deployment/web/dist without pages/ and widgets.css — every page 404s #1580

Open

Description

@jopterhorst

Summary

With mxcli run --local --watch, the first hot reload after a model change leaves deployment/web/dist holding only index.js and chunks/. The pages/ folder and widgets.css are gone, so every page fails to load with "An error occurred while loading page" until the app is restarted.

Repro

  1. mxcli run --local --watch --detach -p app.mpr. deployment/web/dist/pages holds 60 files, and GET /dist/pages/Mod.Home.js returns 200.
  2. mxcli exec change.mdl -p app.mpr, where change.mdl only creates one microflow:
    mdl 1;
    create or modify microflow Mod.MF_Watch () returns String as $R begin return 'x'; end;
    
  3. mxcli run wait -p app.mpr prints applied: build #2 via reload in 4.3s.
  4. ls deployment/web/dist shows only chunks and index.js. dist/pages is gone, widgets.css is no longer under deployment/web, and GET /dist/pages/Mod.Home.js returns 404.

Expected

A reload leaves a complete dist, as after the initial build.

Actual

A reload that reports success leaves an app where no page loads. We saw this four times in one day, after model changes and after theme SCSS edits.

Workaround

mxcli run stop followed by run --local --watch again after every change.

Tested with: mxcli nightly-20261018-80b1b8d0d (also seen on v0.26.0), Mendix 11.12.5, macOS arm64.

Activity

  1. github-actions commented on Oct 19, 2026

    @github-actions

    Issue Triage

    Summary:
    The user reports that a hot‑reload triggered by mxcli run --local --watch deletes the pages/ folder and widgets.css from deployment/web/dist, causing all pages to 404 until the app is restarted.

    Checklist of required bug‑report information

    Required info Present? Details
    mxcli version ✅ nightly-20261018-80b1b8d0d (also seen on v0.26.0)
    Mendix version ✅ 11.12.5
    Scenario (what was done) ✅ mxcli run --local --watch --detach, then mxcli exec change.mdl, then mxcli run wait
    Expected output ✅ A reload should leave a complete dist folder (as after the initial build)
    Experienced output ✅ After reload, dist contains only chunks/ and index.js; pages/ and widgets.css missing → 404s
    AI bug report (mxcli diag --bundle or session log) ❌ Not provided

    What’s missing:
    Please attach the output of mxcli diag --bundle (or at least the relevant session log) so we can inspect the internal state during the reload. This will help us pinpoint why the pages/ folder and widgets.css are being removed.

    Thank you for reporting the issue! Once we have the diagnostic bundle, we’ll be able to investigate further.


    Automated triage via OpenRouter — workflow source

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions