compile assets fails after upgrade of yarn

92 views
Skip to first unread message

Adon Irani

unread,
Jan 9, 2018, 9:47:36 PM1/9/18
to Canvas LMS Users
Hi everyone,
I tried to do a clean build of canvas based on the updated (as of 3 days ago) production guide. It required me to upgrade yarn, no longer held back to 0.27
But it fails (error below).

If i edit app/stylesheets/base/_variables.scss and comment out line 32 and add $use_high_contrast: false; on line 33, it compiles. But that's likely a bad solution.
line 32 @import "variant_variables"; is what's broken... any ideas where i can find this file?

Here is the error i get:

error compiling sass { Error: File to import not found or unreadable: variant_variables.
Parent style sheet: app/stylesheets/base/_variables.scss
    at options.error (/var/canvas/node_modules/node-sass/lib/index.js:291:26)
  cause:
   { Error: File to import not found or unreadable: variant_variables.
   Parent style sheet: app/stylesheets/base/_variables.scss
       at options.error (/var/canvas/node_modules/node-sass/lib/index.js:291:26)
     status: 1,
     file: 'app/stylesheets/base/_variables.scss',
     line: 32,
     column: 1,
     message: 'File to import not found or unreadable: variant_variables.\nParent style sheet: app/stylesheets/base/_variables.scss',
     formatted: 'Error: File to import not found or unreadable: variant_variables.\n       Parent style sheet: app/stylesheets/base/_variables.scss\n        on line 32 of app/stylesheets/base/_variables.scss\n>> @import "variant_variables";\n   ^\n' },
  isOperational: true,
  status: 1,
  file: 'app/stylesheets/base/_variables.scss',
  line: 32,
  column: 1,
  formatted: 'Error: File to import not found or unreadable: variant_variables.\n       Parent style sheet: app/stylesheets/base/_variables.scss\n        on line 32 of app/stylesheets/base/_variables.scss\n>> @import "variant_variables";\n   ^\n' } Error: File to import not found or unreadable: variant_variables.
Parent style sheet: app/stylesheets/base/_variables.scss
    at options.error (/var/canvas/node_modules/node-sass/lib/index.js:291:26) File to import not found or unreadable: variant_variables.
Parent style sheet: app/stylesheets/base/_variables.scss
Segmentation fault (core dumped)
error Command failed with exit code 139.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
rake aborted!
error running brandable_css
/var/canvas/lib/tasks/css.rake:23:in `block (3 levels) in <top (required)>'
/var/canvas/lib/tasks/css.rake:16:in `block (2 levels) in <top (required)>'
/var/canvas/lib/tasks/canvas.rake:40:in `block (2 levels) in <top (required)>'
/var/canvas/vendor/bundle/ruby/2.4.0/gems/rake-12.2.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => css:compile

Samuel Santhosh

unread,
Jan 10, 2018, 2:19:39 AM1/10/18
to Canvas LMS Users
Hi,

Which yarn version you are using, I have came through the same error.
I have upgraded the yarn version to 1.3.2 

 

npm install -g ya...@1.3.2

Adon Irani

unread,
Jan 10, 2018, 7:41:46 AM1/10/18
to Canvas LMS Users
Hi Samuel,
Same. 1.3.2.

I was able to successfully compile with the code adjustment, but that also took a ridiculous amount of memory (more than previously, which may or may not be related to the yarn version).

Adon

Adon Irani

unread,
Jan 10, 2018, 7:27:03 PM1/10/18
to Canvas LMS Users
The theme editor gets messed up by commenting out the variants variables. Definitely not a solid fix.

If this is an issue with the latest build of Canvas, what's the process to report a build error?
It's definitely an issue with line 32 @import "variant_variables in app/stylesheets/base/_variables.scss

thanks,
Adon

Adon Irani

unread,
Jan 10, 2018, 8:56:39 PM1/10/18
to Canvas LMS Users
I found this: https://github.com/instructure/canvas-lms/issues/951
Seems like similar error report. Solution recommended allows compile, but I'm still getting a broken theme editor -- the variant variables don't update it seems, and all the link text goes white on white.

Adon Irani

unread,
Jan 11, 2018, 10:12:45 PM1/11/18
to Canvas LMS Users
My error -- the #951 issue is a valid fix. I had to wipe the database and do a full canvas installation.
the issue i experienced with the theme editor must have been linked to my debug effort prior to finding the #951 solution.

Apologies

Adon
Reply all
Reply to author
Forward
0 new messages