My colleague build image for openedx-dev fail. Here are steps he did:
Install Tutor from Source (with local launch)
Set up open-edx development. (we cloned open-edx source inside the host folder)
add mount
Build image via “tutor images build openedx-dev --no-cache”
Here is the error message:
1.254 File "/openedx/edx-platform/scripts/compile_sass.py", line 335, in main
1.254 compile_sass_dir(
1.254 File "/openedx/edx-platform/scripts/compile_sass.py", line 252, in compile_sass_dir
1.254 raise Exception(f"Failed to compile {source}: {output_text}")
1.255 Exception: Failed to compile lms/static/sass/lms-main-v1-rtl.scss: Error: Invalid CSS after "": expected 1 selector or at-rule, was "./../common/sta..."
1.255 on line 1 of lms/static/sass/_mixins.scss
1.255 >> ../../../common/static/sass/_mixins.scss
1.255 ^
1.255
------
Dockerfile:206
--------------------
204 | # will be processed. This makes the docker image lighter and faster to build.
205 | RUN npm run postinstall # Postinstall artifacts are stuck in nodejs-requirements layer. Create them here too.
206 | >>> RUN npm run compile-sass -- --skip-themes
207 | RUN npm run webpack
208 |
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run compile-sass -- --skip-themes" did not complete successfully: exit code: 1
Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx:18.1.2-indigo --no-cache --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:18.1.2-indigo-cache --build-context=edx-platform=C:\OpenEdX\Prod\edx-platform C:\OpenEdX\Prod\env\build\openedx
We try to uninstall tutor and install again. The same error happens. Is there any thing we make it incorrectly?
Yes, I did. I reinstall Tutor. Tutor local/dev launch works fine.
Later, I clone edx-platform from git and mount this folder. I add file docker-compose.override.yml to both local and dev. Here is the content of override file.
If you are using Tutor master branch, you should be using open edX’s current release from platform (open-release/redwood.master for instance). If you want to run Open edX platform master, you should be using tutor nightly Running Open edX on the master branch (“nightly”) — Tutor documentation
Today I install tutor 18.1.2 and setup work environment (checkout branch redwood/master. after adding mount, I build image openedx-dev and it is still failed. I do not know why.
=> [production 30/37] RUN npm run postinstall # Postinstall artifacts are stuck in nodejs-requirements layer. Create them here too. 1.3s
=> ERROR [production 31/37] RUN npm run compile-sass -- --skip-themes 0.8s
------
> importing cache manifest from openedx-dev:18.1.2-cache:
------
------
> [production 31/37] RUN npm run compile-sass -- --skip-themes:
0.582
0.582 > edx@0.1.0 compile-sass
0.582 > scripts/compile_sass.py --env=${NODE_ENV:-production} --skip-themes
0.582
0.626 USING ENV: production
0.626
0.626
0.626 Compiling default Sass...
0.626 Compiling default LMS Sass...
0.626 Source: lms/static/sass
0.626 Target: lms/static/css
0.626 Include paths:
0.626 common/static
0.626 common/static/sass
0.626 node_modules/@edx
0.626 node_modules
0.626 lms/static/sass/partials
0.626 lms/static/sass
0.626 Files:
0.626 lms/static/sass/lms-footer-rtl.scss -> lms/static/css/lms-footer-rtl.css
0.701 lms/static/sass/lms-main-v1-rtl.scss -> lms/static/css/lms-main-v1-rtl.css
0.801 Traceback (most recent call last):
0.801 File "/openedx/edx-platform/scripts/compile_sass.py", line 503, in <module>
0.801 main(prog_name="npm run compile-sass --")
0.801 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
0.801 return self.main(*args, **kwargs)
0.801 ^^^^^^^^^^^^^^^^^^^^^^^^^^
0.801 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
0.801 rv = self.invoke(ctx)
0.801 ^^^^^^^^^^^^^^^^
0.801 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
0.801 return ctx.invoke(self.callback, **ctx.params)
0.801 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.801 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
0.802 return __callback(*args, **kwargs)
0.802 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.802 File "/openedx/venv/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
0.802 return f(get_current_context(), *args, **kwargs)
0.803 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.803 File "/openedx/edx-platform/scripts/compile_sass.py", line 335, in main
0.804 compile_sass_dir(
0.804 File "/openedx/edx-platform/scripts/compile_sass.py", line 252, in compile_sass_dir
0.804 raise Exception(f"Failed to compile {source}: {output_text}")
0.805 Exception: Failed to compile lms/static/sass/lms-main-v1-rtl.scss: Error: Invalid CSS after "": expected 1 selector or at-rule, was "./../common/sta..."
0.805 on line 1 of lms/static/sass/_mixins.scss
0.805 >> ../../../common/static/sass/_mixins.scss
0.805 ^
0.805
------
Dockerfile:206
--------------------
204 | # will be processed. This makes the docker image lighter and faster to build.
205 | RUN npm run postinstall # Postinstall artifacts are stuck in nodejs-requirements layer. Create them here too.
206 | >>> RUN npm run compile-sass -- --skip-themes
207 | RUN npm run webpack
208 |
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run compile-sass -- --skip-themes" did not complete successfully: exit code: 1
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/uye4k57p1fnpkuoxmsg76mwv0
Error: Command failed with status 1: docker buildx build --tag=openedx-dev:18.1.2 --output=type=docker --target=development --build-arg=APP_USER_ID=1000 --cache-from=type=registry,ref=openedx-dev:18.1.2-cache --build-context=edx-platform=C:\Host\edx-platform C:\Host\env\build\openedx
C:\Host>code .
C:\Host>
It seems you are using Windows? If so, Tutor does not work on Windows out of box. There is some documentation update work in progress to add troubleshooting for running Tutor on Windows.