# Storage Snapshot - Broken Bundle State ## Created 2025-11-12 ## How Created 1. Ran `php artisan rsx:dev:update_npm` 2. Command executed: - npm update (no packages changed, already up to date) - rsx:clean (cleared all caches) - rsx:bundle:compile (compiled all 12 bundles via CLI) ## What This Demonstrates This snapshot captures the **broken state** where CLI-built bundles are missing JS stubs. ### Observable Issue When loading `/contacts` after this CLI build: ``` JavaScript Console Error: Frontend_Clients_Controller is not defined at Frontend_Bundle__app.8e0e8df3.js:19231:31 ``` ### The Problem - **JS stub file EXISTS**: `rsx-build/js-stubs/Frontend_Clients_Controller.js` is present in filesystem - **Bundle is MISSING stub**: The compiled `Frontend_Bundle__app.8e0e8df3.js` does not include the stub - **Result**: JavaScript references to `Frontend_Clients_Controller` fail at runtime ### Key Files to Examine - `rsx-build/js-stubs/*.js` - Generated stub files (DO exist) - `rsx-build/manifest_data.php` - Manifest metadata (check if stubs are registered) - `_compiled/Frontend_Bundle__app.*.js` - Compiled bundle (check if stubs are included) ### Root Cause Hypothesis The manifest may not be properly registering stub files during initial CLI build, causing the bundle compiler to skip them. Stubs might only get registered on a second pass when the system checks for existing stubs. ### Reproduction Steps ```bash # Start fresh php artisan rsx:dev:update_npm # Test (will show error) php artisan rsx:debug /contacts --user=1 # Expected error: Frontend_Clients_Controller is not defined ``` ### Known Working State Running `php artisan rsx:clean` followed by a browser page load will trigger a rebuild that DOES include stubs correctly.