This exact issue just happened to me and I am still running Lilac. All the assets.min.js, runtime.min.js files were missing from the CMS.
I just noticed that I also have the same problem in my development instance running Lilac.
By pulling the docker image I was able to resolve it. See my reply at the end and change your version number according to your config
I am using a fork of edx-platform, so I cannot use the prebuilt docker image unfortunately.
I am using a fork as well. What I don’t understand is what would have changed from last week to this week?
Does anyone know how those files are generated and minified?
So I continued to do some more investigation. Maybe this will help someone figure out what is going on.
I restored a snapshot I had from last week when the page loaded fine. Doing a view source on the page, I can see this piece of code:
Everything loads fine. Looking at the same page on the latest build, I see this:
As was originally pointed out by @gostdio , those files are now missing. Also, the corresponding css (assets.min.cs, common.min.css) files are missing as well.
I believe the files are generated during the
openedx-assets script section of the Dockerfile.
I have attached the Lilac version of the Dockerfile for reference.
openedx-assets script from Tutor uses the following Python file for managing the assets:
After further probing, I found that the
@edx/studio-frontend npm module does not include a dist folder anymore. The dist folder includes most of the files mentioned by @gostdio as missing.
A quick solution that I found is to pin the
@edx/studio-frontend to 1.17.0 which is the latest version that comes with the dist folder.
@uetuluk Can I ask what file you modified to pin the
@edx/studio-frontend to 1.17.0?
For anyone else that comes across this, I modified the
package.json in my
I changed this line:
Great work @uetuluk for figuring this out!
Hello guys, how are you?
Tutor 13.1.8 and I’m having this problem.
This release already has @edx/studio-frontend 1.17.0.
These are the missing files that I noticed:
static/studio/common/css/vendor/common.min.css static/studio/common/css/vendor/courseOutlineHealthCheck.min.css static/studio/common/css/vendor/assets.min.css static/studio/common/js/vendor/runtime.min.js static/studio/common/js/vendor/common.min.js static/studio/common/js/vendor/courseOutlineHealthCheck.min.js static/studio/common/js/vendor/assets.min.js
- Files & Uploads
- Content / Outline
- Tools / Checklist
I can confirm this problem also exists with
@erickhgm The @edx/studio-frontend should be pinned to 1.17.0. The default package.json file has the line “^1.17.0” which will use the most updated version of the package.
@regis Sorry for bothering you.
This problem also exists with
open-release/maple.3 using Tutor 13.1.11.
Do you know why the dist folder is not included in new versions of the @edx/studio-frontend package?
It’s true, I hadn’t noticed that detail. I will test …
Thank you @uetuluk
Thanks for your work and your investigation everyone! Please let me know if I understand the problem correctly:
- The @edx/studio-frontend package is a requirement of edx-platform, with version
^1.17.0, which basically mean “anything between 1.0.0 (included) and 2.0.0 (excluded)” (see: https://semver.npmjs.com/).
- The @edx/studio-frontend package was recently (~ April 4th) updated to 1.18.2. Because of the unpinned required requirement in edx-platform, this causes new builds of Docker images to upgrade to the newest release.
- The 1.18.2 release does not ship with some required files, such as
node_modules/@edx/studio-frontend/dist/common.min.js, thus causing errors in the studio.
- The files that are missing in 1.18.2 were present in 1.17.0, as we can see by running:
$ find node_modules/@edx/studio-frontend/ -name "common*.css" node_modules/@edx/studio-frontend/dist/common.min.js
- The first version in which the dist/ folder was missing is 1.18.0: https://registry.npmjs.org/@edx/studio-frontend/-/studio-frontend-1.18.0.tgz Compare with 1.17.0 where the dist/ foldr was present: https://registry.npmjs.org/@edx/studio-frontend/-/studio-frontend-1.17.0.tgz
It seems to me that there are two bugs here, both upstream:
- The @edx/studio-frontend package should have a version pinned to 1.17.0 in edx-platform’s package.json.
- The 1.18.* versions of package @edx/studio-frontend should include the dist/ folder.
I have no idea why edX.org is not affected by (2). My guess is that npm packages are either installed in place or stored in a CDN, which caches older versions for some reason.
I propose to fix the issue in Tutor by pinning the studio-frontend version in the open-release/maple.master branch of edx-platform. Would someone like to open a pull request on edx-platform to that effect? You should link to this comment in your PR description. Then, open a PR on Tutor to cherry-pick your commit.
Thanks again for your work!
I can open the pull request for the edx-platform.
Thank you @regis for organizing the findings in an easy to present format.
Edit: I have opened the following PR for this issue: Pin npm package @edx/studio-frontend to 1.17.0 to fix missing assets by uetuluk · Pull Request #30309 · openedx/edx-platform · GitHub
Shouldn’t the new version of
edx/studio-frontend be fixed?
Using the 1.17.0 in edx-platform’s package.json would be a temporary solution, right?
I started working with Open edX about 3 months ago and I see many opportunities for improvement, especially in the documentation.
It will be a pleasure to contribute …
Everything working fine, I can open the PR to git cherry-pick.