overhangio / tutor-indigo

An elegant, customizable theme for Open edX
GNU Affero General Public License v3.0
74 stars 276 forks source link

sass.CompileError: Error invalid CSS after "$primary:" #17

Closed pherms closed 2 years ago

pherms commented 2 years ago

Description When following the instructions on the tutor manual page: https://docs.tutor.overhang.io/tutorials/theming.html#theming I run into a problem when running the command: tutor images build openedx I get an error in step 80/86. The error is:

Compiling lms sass assets from theme /openedx/themes/indigo...
Traceback (most recent call last):
  File "/openedx/bin/openedx-assets", line 218, in <module>
    main()
  File "/openedx/bin/openedx-assets", line 89, in main
    args.func(args)
  File "/openedx/bin/openedx-assets", line 153, in run_themes
    assets._compile_sass(system, Path(theme_path), False, False, [])
  File "/openedx/edx-platform/pavelib/assets.py", line 558, in _compile_sass
    sass.compile(
  File "/openedx/venv/lib/python3.8/site-packages/sass.py", line 644, in compile
    raise CompileError(v)
sass.CompileError: b'Error: Invalid CSS after "$primary:": expected 1 selector or at-rule, was "NDIGO_PRIMARY_C..."\n        on line 1 of 
../themes/indigo/lms/static/sass/partials/lms/theme/_variables.scss\n>> $primary: {{ INDIGO_PRIMARY_COLOR }};\n   ---------^\n'
The command '/bin/sh -c openedx-assets themes     && openedx-assets collect --settings=tutor.assets     && rdfind -makesymlinks true -followsymlinks true /openedx/staticfiles/' returned a non-zero code: 1

This is the contents of the file in a text editor:

$primary: {{ INDIGO_PRIMARY_COLOR }};

// Theme fonts
$font-family-title: Plex;
$serif: Crimson;
$f-sans-serif: Crimson, 'Open Sans','Helvetica Neue', Helvetica, Arial, sans-serif;

// Initialize the Open edX Bootstrap theme
@import 'edx-bootstrap/sass/open-edx/theme';

As I said, I have followed the instructions on the tutor manual page.

Expected behavior The command tutor images build openedx succeeds in building the containers.

Actual behavior A sass.CompileError is thrown in step 80/86 when running the command tutor images build openedx

regisb commented 2 years ago

This is not an error. Please read the indigo docs: https://github.com/overhangio/indigo#installation I believe you forgot to run the "render" command.

Please don't use GitHub issues for support; instead, ask your question on the Tutor forum: https://discuss.overhang.io/ I realize that the indigo project does not link to the Tutor forum, so I'll make that change now.