[x] Static assets available in a fresh provision of lms/cms
[x] Notes added to "Past problems (fixed)" section of devstack's docs/troubleshoot_general_tips.rst
In a fresh re-provision of devstack in late October 2024, the static assets builds for lms and cms appear to run successfully, but the sites serve an error page like this:
OSError: Error reading /edx/var/edxapp/staticfiles/webpack-stats.json. Are you sure webpack has generated the file and the path is correct?
As it turns out, the static assets are all present in that parent directory (/edx/var/edxapp/staticfiles/) and the only thing that's missing is the webpack-stats.json itself -- instead, it is written to /edx/app/edxapp/edx-platform/test_root/staticfiles/ (and same for ./studio/webpack-stats.json). Moving these stats files to the right place causes them to work again.
Likely the fix will involve adjusting environment variables STATIC_ROOT_LMS/CMS or related Django settings. edxapp has the following line in webpack.common.config.js: var staticRootLms = process.env.STATIC_ROOT_LMS || './test_root/staticfiles'; -- and yes, /edx/app/edxapp/edx-platform/test_root/staticfiles exists. That's where the files are ending up! Probably this is fallout from the Paver removal mid-2024, and some of the needed config changes just didn't make it into devstack.
A/C:
docs/troubleshoot_general_tips.rst
In a fresh re-provision of devstack in late October 2024, the static assets builds for lms and cms appear to run successfully, but the sites serve an error page like this:
OSError: Error reading /edx/var/edxapp/staticfiles/webpack-stats.json. Are you sure webpack has generated the file and the path is correct?
As it turns out, the static assets are all present in that parent directory (
/edx/var/edxapp/staticfiles/
) and the only thing that's missing is thewebpack-stats.json
itself -- instead, it is written to/edx/app/edxapp/edx-platform/test_root/staticfiles/
(and same for./studio/webpack-stats.json
). Moving these stats files to the right place causes them to work again.Likely the fix will involve adjusting environment variables
STATIC_ROOT_LMS
/CMS or related Django settings. edxapp has the following line inwebpack.common.config.js
:var staticRootLms = process.env.STATIC_ROOT_LMS || './test_root/staticfiles';
-- and yes,/edx/app/edxapp/edx-platform/test_root/staticfiles
exists. That's where the files are ending up! Probably this is fallout from the Paver removal mid-2024, and some of the needed config changes just didn't make it into devstack.