I'm having issues with developing the frontend of the framework on 2.x, specifically with components which are now lazy loaded. When running yarn dev
I get a bunch of Could not find chunk for
... errors:
➜ js git:(di/scrubber-extensibility) ✗ yarn dev
yarn run v1.22.19
$ webpack --mode development --watch
Could not find chunk for /Users/iadeluca/Documents/GitHub/docker-flarum-2.x/flarum-framework-2.x/framework/core/js/src/forum/components/SignUpModal
...
Related errors can also be seen in the Console when trying to load a lazy loaded component:
Uncaught (in promise) ChunkLoadError: Loading chunk forum/components/SignUpModal failed.
(error: http://localhost/assets/forum/components/SignUpModal.js)
at __webpack_require__.f.j (jsonp chunk loading:27:1)
at ensure chunk:6:1
at Array.reduce (<anonymous>)
at __webpack_require__.e (ensure chunk:5:1)
at HeaderSecondary.js:65:47
at ModalManagerState.show (ModalManagerState.ts:81:1)
at HTMLButtonElement.onclick (HeaderSecondary.js:65:29)
Output of php flarum info
:
Flarum core: 2.0.0-beta.2
PHP version: 8.3.14
MySQL version: 8.0.40
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, hash, iconv, json, mbstring, SPL, session, PDO, pdo_sqlite, standard, posix, random, readline, Reflection, Phar, SimpleXML, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, calendar, exif, gd, intl, pcntl, pdo_mysql, sockets, sodium, zip, Zend OPcache
+----------------------+---------+--------+
| Flarum Extensions | | |
+----------------------+---------+--------+
| ID | Version | Commit |
+----------------------+---------+--------+
| flarum-flags | 2.x-dev | |
| flarum-approval | 2.x-dev | |
| flarum-tags | 2.x-dev | |
| flarum-suspend | 2.x-dev | |
| flarum-subscriptions | 2.x-dev | |
| flarum-sticky | 2.x-dev | |
| flarum-statistics | 2.x-dev | |
| flarum-messages | 2.x-dev | |
| flarum-mentions | 2.x-dev | |
| flarum-markdown | 2.x-dev | |
| flarum-lock | 2.x-dev | |
| flarum-likes | 2.x-dev | |
| flarum-lang-english | 2.x-dev | |
| flarum-emoji | 2.x-dev | |
| flarum-bbcode | 2.x-dev | |
+----------------------+---------+--------+
Base URL: http://localhost
Installation path: /var/www
Queue driver: sync
Session driver: file
Mail driver: log
Debug mode: ON
Any ideas what I should troubleshoot?
I'm on a Apple Silicon MacBook running macOS Sonama 14.1.1 if it matters.