edx / devstack

Get up and running quickly to develop or extend Open edX services
GNU Affero General Public License v3.0
1 stars 0 forks source link

Devstack edxapp static assets are not available #65

Closed timmc-edx closed 3 weeks ago

timmc-edx commented 1 month ago

A/C:

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.

timmc-edx commented 4 weeks ago

https://github.com/edx/devstack/pull/66 should fix this -- will test a fresh re-provision before getting it reviewed though.

timmc-edx commented 3 weeks ago

Works now.