Search code examples
sproutcore

Sass::SyntaxError: Undefined mixin 'background-image' in sproutcore sc-server


I am following the Sproutcore getting started guide from here: http://guides.sproutcore.com/getting_started.html

When I run sc-server inside the Sproutcore application directory and request http://localhost:4020/todos from the browser, I get the following error:

Sass::SyntaxError: Undefined mixin 'background-image'.
    ././tmp/chance/c252db965d416a210509d6610c706976.scss:79:in `background-image'
    ././tmp/chance/c252db965d416a210509d6610c706976.scss:79
    chance_main.css:2
...

This is the section of the .scss file referred to:

    .sc-button {
79--> @include background-image(linear-gradient(#F9F9F9 1%, #DDD, #F2F2F2, #F7F7F7));
      border: 1px solid #828282;
      color: #000;
      float: right;
      padding: 0 5px;

Solution

  • OK, the problem had nothing to do with any of the other source files, but was due to a typo in my todo.js (the main application javascript file). I had separated items in an associative array with a semicolon (;) instead of a comma (,). The stack trace simply was not very helpful in this regard.