Picture of Stephen Harlow
Less:compile error in framework 2.0.16
by Stephen Harlow - Tuesday, 31 January 2017, 9:48 PM
 

Hi

I've been playing with upgrading a couple of courses to framework 2.0.16. The course I created in framework 2.0.11 upgraded and built fine (when I replaced all but the src folder with the new framework files). However, when I exported code from an older course created with the AT (0.1.5/Framework 2.0.10) and followed the same method the build fails with a less:compile error (see below). Creating a new course with adapt create course and replacing the src folder gives the same error on running grunt build. Why might his be?

 

Fatal error: {
"type": "Name",
"filename": "src\\components\\adapt-contrib-accordion\\less\\accordion.less",
"index": 69,
"line": 4,
"callLine": null,
"column": 23,
"extract": [
" .accordion-item {",
" margin-bottom: @item-margin-bottom;",
" }"
],
"message": "variable @item-margin-bottom is undefined"
}

Picture of Ignacio Cinalli
Re: Less:compile error in framework 2.0.16
by Ignacio Cinalli - Wednesday, 1 February 2017, 3:25 PM
 

Hi Stephen, check out build data in config.json

"build": {
    "includes": [

]

}

 

Picture of Brian Quinn
Re: Less:compile error in framework 2.0.16
by Brian Quinn - Thursday, 2 February 2017, 9:17 AM
 

Hi Stephen,

Which theme are you using?  If it's something custom please make sure that it includes the @item-margin-bottom LESS variable.

For example, it's defined in the Vanilla LESS here:
https://github.com/adaptlearning/adapt-contrib-vanilla/blob/master/less/paddings.less#L40

Hope this helps.

Brian

Picture of Joe Wickert
Re: Less:compile error in framework 2.0.16
by Joe Wickert - Tuesday, 7 February 2017, 1:03 AM
 

Hi, I was getting this issue as well.

Export course from Authoring Tool. Unzip and run npm install from the dir. to rebuild the course.

I was getting the error with the vanilla theme too. And by replacing the demo course on a fresh build with my course.

I had a look at the src/course/config.js files for both.

My old course had plug-ins listed like this:

  "build": {
    "includes": [
      "adapt-contrib-vanilla",
      "adapt-contrib-boxMenu",
      "adapt-contrib-accordion"
    ]
  }

The new course had:

  "build": {
  }

Even though all plug-ins were being used.

I emptied the build object like it was in the sample course. Ran grunt build again and everything worked fine

There is some documentation about the build object in the framework instructions. Not sure why including the accordion component in the build object would cause the issue. But this seems to be a fix.

Picture of Stephen Harlow
Re: Less:compile error in framework 2.0.16
by Stephen Harlow - Tuesday, 7 February 2017, 4:21 AM
 

Brilliant!

Thanks Joe, emptying the build object, as you described, worked for me too.

Stephen