GithubHelp home page GithubHelp logo

brandable_css's People

Contributors

ryankshaw avatar

Watchers

 avatar  avatar  avatar

brandable_css's Issues

[Bug] name too long, stat 'app/stylesheets...

Hello again Ryan,

This issue is a little annoying but not critical.

When I try to launch "./node_modules/.bin/brandable_css --watch", I have the following error:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: ENAMETOOLONG: name too long, stat 'app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app/stylesheets/app'
    at Error (native)

It seems to be caused by an infinite loop on app/stylesheets path. But I tried investigating your code without being able to find anything that may create this loop. I also checked for any symlinks in my Canvas project that may link to that folder, I did not find any. I also tried with last unmodified version of Instructure/master branch, the bug still happens.

This only happens with the watch option. Everything works fine without it. It's just annoying as my assets are no longer watched during development...

I know this bug happens on some specific environments only (mostly Linux). I'm running it under Ubuntu 14.04 on a VM.

I don't ask you to actually solve the bug as it is very specific to people working on Ubuntu like me (I think), but just to help me finding what may create this infinite loop, so that I may be able to quick fix my brandable css node module. :)

Any idea?
Thanks a lot!

Can't use on RHEL6

This is more of an issue for pierreinglebert/node-zopfli, but it is impacting SFU's ability to build Canvas, so it's here as an FYI:

Asset compilation via brandable_css is no longer working on RedHat Enterprise Linux 6. The culprit is the node-zopfli module required by brandable_css, since 5f5b44a.

[webapps@atlassian canvas-lms]$  RAILS_ENV=production bundle exec rake canvas:compile_assets[false]

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/canvas-lms/Rakefile:11)
--> Starting: 'Making sure node_modules are up to date'
--> Finished: 'Making sure node_modules are up to date' in 4.800319236
--> Starting: 'compile css (including custom brands)'
module.js:522
  var nodePath = process.env['NODE_PATH'];
                        ^
Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /tmp/canvas-lms/node_modules/brandable_css/node_modules/node-zopfli/lib/binding/node-v14-linux-x64/zopfli.node)
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/tmp/canvas-lms/node_modules/brandable_css/node_modules/node-zopfli/lib/zopfli.js:7:14)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/tmp/canvas-lms/node_modules/brandable_css/lib/handleGzip.js:11:37)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
--> Finished: 'compile css (including custom brands)' in 1.171742863

See: pierreinglebert/node-zopfli#60

[CRITICAL] brandable_css/bin/brandable_css fails with new version of npm node-sass in Canvas LMS

Hello Ryan, @ryankshaw

Today I did an update of my npm modules in my Canvas LMS.
But when I tried to launch brandable_css/bin/brandable_css, I got following error:

error compiling sass { [Error: Import directives may not be used within control directives or mixins.]
  cause: 
   { [Error: Import directives may not be used within control directives or mixins.]
     formatted: 'Error: Import directives may not be used within control directives or mixins.\n        on line 32 of app/stylesheets/base/_variables.scss\n>>   @import "brand_variables";\n   --^\n',
     message: 'Import directives may not be used within control directives or mixins.',
     column: 3,
     line: 32,
     file: 'app/stylesheets/base/_variables.scss',
     status: 1 },
  isOperational: true,
  formatted: 'Error: Import directives may not be used within control directives or mixins.\n        on line 32 of app/stylesheets/base/_variables.scss\n>>   @import "brand_variables";\n   --^\n',
  column: 3,
  line: 32,
  file: 'app/stylesheets/base/_variables.scss',
  status: 1 } Error: Import directives may not be used within control directives or mixins.
    at options.error (/home/regmillet/Workspace/RailsProjects/canvas-lms/node_modules/node-sass/lib/index.js:271:32) Import directives may not be used within control directives or mixins.

So, I tried to comment this line (my brand_variables file is empty) and got this new error:

error compiling sass { [Error: Undefined variable: "$lightBackground".]
  cause: 
   { [Error: Undefined variable: "$lightBackground".]
     formatted: 'Error: Undefined variable: "$lightBackground".\n        on line 5 of app/stylesheets/bundles/account_admin_tools.scss\n>>     background-color: $lightBackground;\n   ----------------------^\n',
     message: 'Undefined variable: "$lightBackground".',
     column: 23,
     line: 5,
     file: '/home/regmillet/Workspace/RailsProjects/canvas-lms/app/stylesheets/bundles/account_admin_tools.scss',
     status: 1 },
  isOperational: true,
  formatted: 'Error: Undefined variable: "$lightBackground".\n        on line 5 of app/stylesheets/bundles/account_admin_tools.scss\n>>     background-color: $lightBackground;\n   ----------------------^\n',
  column: 23,
  line: 5,
  file: '/home/regmillet/Workspace/RailsProjects/canvas-lms/app/stylesheets/bundles/account_admin_tools.scss',
  status: 1 } Error: Undefined variable: "$lightBackground".
    at options.error (/home/regmillet/Workspace/RailsProjects/canvas-lms/node_modules/node-sass/lib/index.js:271:32) Undefined variable: "$lightBackground".

I did some search and found that node-sass has been updated recently to version 3.5: https://github.com/sass/node-sass/commits/master

Take a look here: sass/node-sass#1471

As a temporary fix, I forced version 3.4 in my brandable_css package.json config, and it did solve the problem.

Could you also do the same until you solve those breaking changes within Canvas? It may break a lot of production environments, don't you think? :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.