aulasneo / tutor-contrib-branding

GNU Affero General Public License v3.0
7 stars 5 forks source link

Getting error `tutor images build openedx ` #6

Open wiesener opened 2 days ago

wiesener commented 2 days ago

=> ERROR [production 36/39] RUN npm run compile-sass -- --skip-default 0.5s

[production 36/39] RUN npm run compile-sass -- --skip-default: 0.394 0.394 > edx@0.1.0 compile-sass 0.394 > scripts/compile_sass.py --env=${NODE_ENV:-production} --skip-default 0.394 0.438 USING ENV: production 0.438 0.438 0.439 Compiling Sass for theme at /openedx/themes/theme... 0.439 Compiling default LMS Sass with themed partials... 0.439 Source: lms/static/sass 0.439 Target: /openedx/themes/theme/lms/static/css 0.439 Include paths: 0.439 common/static 0.439 common/static/sass 0.439 node_modules/@edx 0.439 node_modules 0.439 /openedx/themes/theme/lms/static/sass/partials 0.439 lms/static/sass/partials 0.439 lms/static/sass 0.439 Files: 0.439 lms/static/sass/lms-course-rtl.scss -> /openedx/themes/theme/lms/static/css/lms-course-rtl.css 0.505 Traceback (most recent call last): 0.505 File "/openedx/edx-platform/scripts/compile_sass.py", line 503, in 0.506 main(prog_name="npm run compile-sass --") 0.506 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 1157, in call 0.506 return self.main(args, kwargs) 0.506 ^^^^^^^^^^^^^^^^^^^^^^^^^^ 0.506 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 1078, in main 0.506 rv = self.invoke(ctx) 0.506 ^^^^^^^^^^^^^^^^ 0.506 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke 0.506 return ctx.invoke(self.callback, ctx.params) 0.506 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0.506 File "/openedx/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke 0.507 return __callback(args, *kwargs) 0.507 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0.507 File "/openedx/venv/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func 0.507 return f(get_current_context(), args, **kwargs) 0.507 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0.507 File "/openedx/edx-platform/scripts/compile_sass.py", line 397, in main 0.507 compile_sass_dir( 0.507 File "/openedx/edx-platform/scripts/compile_sass.py", line 252, in compile_sass_dir 0.507 raise Exception(f"Failed to compile {source}: {output_text}") 0.507 Exception: Failed to compile lms/static/sass/lms-course-rtl.scss: Error: argument $color of darken($color, $amount) must be a color 0.507 0.507 Backtrace: 0.507 node_modules/bootstrap/scss/_variables.scss:152, in function darken 0.507 node_modules/bootstrap/scss/_variables.scss:152 0.507 on line 152 of node_modules/bootstrap/scss/_variables.scss 0.507 >> $link-hover-color: darken($link-color, 15%) !default; 0.507 ----------------------------^ 0.507

Dockerfile:220

218 | # Now that the default theme is built, build any custom themes 219 | COPY --chown=app:app ./themes/ /openedx/themes 220 | >>> RUN npm run compile-sass -- --skip-default 221 |
222 | # and finally, collect assets for the production image,

ERROR: failed to solve: process "/bin/sh -c npm run compile-sass -- --skip-default" did not complete successfully: exit code: 1 Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx:18.1.3-indigo --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx:18.1.3-indigo-cache /Users/xxx/Library/Application Support/tutor/env/build/openedx

My config looks like this:

BRANDING_ACCENT_A: #00BBF9 BRANDING_ACCENT_B: #FFEE88 BRANDING_BACKGROUND: #ffffff BRANDING_BG_PRIMARY: #ffffff BRANDING_BODY: #FFFFFF BRANDING_BRAND: #9D0054 BRANDING_DANGER: #C32D3A BRANDING_DARK: #273F2F BRANDING_FONTS_URLS:

The tutor version is:

tutor, version 18.1.3
angonz commented 1 day ago

When you set colors with #, please enclose the value between quotes. Otherwise the compiler will treat the value as a comment. E.g.: BRANDING_ACCENT_A: "#00BBF9"

Let me know if this fixes the issue.

wiesener commented 22 hours ago

Okay I've tried with a clean config

BRANDING_ACCENT_A: null
BRANDING_ACCENT_B: null
BRANDING_BACKGROUND: null
BRANDING_BG_PRIMARY: null
BRANDING_BODY: null
BRANDING_BRAND: null
BRANDING_DANGER: null
BRANDING_DARK: null
BRANDING_FONTS_URLS:
BRANDING_FONT_FAMILY:
BRANDING_HOMEPAGE_BG_IMAGE: ''
BRANDING_INFO: null
BRANDING_LIGHT: null
BRANDING_PRIMARY: null
BRANDING_SECONDARY: null
BRANDING_SUCCESS: null
BRANDING_WARNING: null
CMS_HOST: studio.local.edly.io
CMS_OAUTH2_SECRET: xxx
CONTACT_EMAIL: contact@local.edly.io
ENABLE_HTTPS: false
ID: d6yCxRxEjzbk9MNMrDhO0HKJ
JWT_RSA_PRIVATE_KEY: '-----BEGIN RSA PRIVATE KEY-----
...
  -----END RSA PRIVATE KEY-----'
LANGUAGE_CODE: en
LMS_HOST: local.edly.io
MYSQL_ROOT_PASSWORD: xxx
OPENEDX_MYSQL_PASSWORD: xxx
OPENEDX_SECRET_KEY: xxx
PLATFORM_NAME: My Open edX
PLUGINS:
- branding
- indigo
- mfe
PLUGIN_INDEXES:
- https://overhang.io/tutor/main

But still getting the same error.