title: assets compilation in Canvas LMS on ubuntu
body: <p>I am trying to setup Canvas-LMS on my system but during assets compilation I am facing some problems. These are my node versions: </p>
  
  <ul>
  <li><p>node-gyp -v v3.0.3</p></li>
  <li><p>node -v v4.2.1</p></li>
  <li><p>npm -v
  2.10.1</p></li>
  </ul>
  
  <p>This is my console screen while I am trying to compile my assets.</p>
  
  <pre><code>nsgill@STPL-IND-PAGRAWAL:~/projects/canvas-lms$ bundle exec rake canvas:compile_assets --trace
  ** Invoke canvas:compile_assets (first_time)
  ** Execute canvas:compile_assets
  --&gt; Starting: 'Making sure node_modules are up to date'
  npm WARN install Couldn't install optional dependency: Unsupported
  npm WARN install Couldn't install optional dependency: Unsupported
  npm WARN install Couldn't install optional dependency: Unsupported
  npm WARN ENOENT ENOENT: no such file or directory, open '/home/nsgill/projects/canvas-lms/node_modules/concat-stream/package.json'
  npm WARN ENOENT ENOENT: no such file or directory, open '/home/nsgill/projects/canvas-lms/node_modules/load-json-file/package.json'
  --&gt; Finished: 'Making sure node_modules are up to date' in 122.05152510900007
  --&gt; Starting: 'compile css (including custom brands)'
  no sass changes detected
  --&gt; Finished: 'compile css (including custom brands)' in 1.5083165989999543
  working in 2 processes
  --&gt; Starting: 'compile coffee, js 18n, and run r.js optimizer'
  --&gt; Starting: 'js:generate'
  ** Invoke js:generate (first_time)
  ** Execute js:generate
  --&gt; Starting: 'css:styleguide'
  ** Invoke css:styleguide (first_time)
  ** Execute css:styleguide
  --&gt; creating styleguide
  ** Invoke js:build_client_apps (first_time)
  ** Execute js:build_client_apps
  Building client app 'canvas_quizzes'
  Running 'npm install'...
  npm WARN EPEERINVALID react@0.10.0 requires a peer of envify@~1.2.0 but none was installed.
  npm WARN EPACKAGEJSON canvas_quizzes@1.0.0 No repository field.
  npm WARN EPACKAGEJSON canvas_quizzes@1.0.0 No license field.
  Running 'npm run build'...
  --&gt; Finished: 'css:styleguide' in 7.147470806999991
  --&gt; Starting: 'Generate documentation [yardoc]'
  ** Invoke doc:api (first_time)
  ** Execute doc:api
  [error]: Unhandled exception in YARD::Handlers::Ruby::ModuleHandler:
  [error]: in app/controllers/filters/quizzes.rb:19:
  
  19: module Filters::Quizzes
  [error]: NoMethodError: undefined method length' for nil:NilClass [error]: Stack trace: /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:210:inon_ignored_nl'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in parse'     /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:inparse'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:15:in parse'     /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/source_parser.rb:439:inparse'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/source_parser.rb:44:in `block in parse'
  
  Client app 'canvas_quizzes' was built successfully.
  --&gt; Creating ember app bundles
  ** Invoke js:bundle_ember_apps (first_time)
  ** Execute js:bundle_ember_apps
  --&gt; Pre-compiling ember handlebars templates
  ** Invoke jst:ember (first_time)
  ** Execute jst:ember
  --&gt; Pre-compiling handlebars templates
  ** Invoke jst:compile (first_time)
  ** Execute jst:compile
  --&gt; Compiling React JSX
  ** Invoke js:jsx (first_time)
  ** Execute js:jsx
  --&gt; Creating ember app bundles finished in 0.019525174999216688--&gt;         Generating plugin extensions
  ** Invoke js:generate_extensions (first_time)
  
  ** Execute js:generate_extensions
  --&gt; Generating plugin extensions finished in 0.013264465998872765
  --&gt; Compiling CoffeeScript with 'coffee' binary
  /home/nsgill/projects/canvas-        lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:83
  throw e
  ^
  
  Error: Module did not self-register.
  at Error (native)
  at Object.Module._extensions..node (module.js:460:18)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:366:17)
  at require (module.js:385:17)
  at bindings (/home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/node_modules/bindings/bindings.js:76:44)
  at Object. (/home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/lib/c    ontextify.js:1:96)
  at Module._compile (module.js:435:26)
  at Object.Module._extensions..js (module.js:442:10)
  /home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/node_    modules/bindings/bindings.js:83
  throw e
  ^
  
  Error: Module did not self-register.
  at Error (native)
  at Object.Module._extensions..node (module.js:460:18)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:366:17)
  at require (module.js:385:17)
  at bindings (/home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/node_    modules/bindings/bindings.js:76:44)
  at Object. (/home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/lib/c    ontextify.js:1:96)
  at Module._compile (module.js:435:26)
  at Object.Module._extensions..js (module.js:442:10)
  /home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/node_    modules/bindings/bindings.js:83
  throw e
  ^
  
  Error: Module did not self-register.
  at Error (native)
  at Object.Module._extensions..node (module.js:460:18)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:366:17)
  at require (module.js:385:17)
  at bindings (/home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/node_    modules/bindings/bindings.js:76:44)
  at Object. (/home/nsgill/projects/canvas-    lms/gems/canvas_i18nliner/node_modules/jsdom/node_modules/contextify/lib/c    ontextify.js:1:96)
  at Module._compile (module.js:435:26)
  at Object.Module._extensions..js (module.js:442:10)
  [error]: Unhandled exception in YARD::Handlers::Ruby::ModuleHandler:
  [error]: in app/controllers/filters/quiz_submissions.rb:19:
  
  19: module Filters::QuizSubmissions
  [error]: NoMethodError: undefined method length' for nil:NilClass     [error]: Stack trace: /home/nsgill/projects/canvas-    lms/vendor/bundle/ruby/2.2.0/gems/yard-    0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:210:inon_ignored_nl'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-    0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in parse'     /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-    0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:inparse'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-    0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:15:in parse'     /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-    0.8.7.6/lib/yard/parser/source_parser.rb:439:inparse'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/yard-    0.8.7.6/lib/yard/parser/source_parser.rb:44:in `block in parse'
  
  --&gt; Compiling React JSX finished in 11.014921448999303b
  [warn]: @param tag has unknown parameter name: conversations 
  in file app/controllers/quizzes/quiz_submission_users_controller.rb'     near line 139 ⌏ Generating /home/nsgill/projects/canvas-    lms/public/doc/api/all_resources.html.....................................    ............................⌌ Generating /home/nsgill/projects/canvas-    lms/public/doc/api/all_resources.html.....................................    ............................⌍ Generating /home/nsgill/projects/canvas-    lms/public/doc/api/all_resources.html.....................................    ............................⌎ Generating     lms/public/doc/api/all_resources.html.....................................    ............................Files: 94 Modules: 0 ( 0 undocumented)     Classes: 93 ( 30 undocumented) Constants: 0 ( 0 undocumented) Methods: 416     ( 7 undocumented) 92.73% documented API Documentation successfully     generated in public/doc/api See public/doc/api/index.html --&gt; Finished:     'Generate documentation [yardoc]' in 40.264044159999685 rake aborted!     Undumpable Exception -- #&lt;EOFError: end of file reached&gt;     /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/parallel-    1.4.1/lib/parallel.rb:63:inwork'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/parallel-1.4.1/lib/parallel.rb:280:in block (4 levels) in work_in_processes' /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/parallel-1.4.1/lib/parallel.rb:447:inwith_instrumentation'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/parallel-1.4.1/lib/parallel.rb:279:in block (3 levels) in work_in_processes' /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/parallel-1.4.1/lib/parallel.rb:273:inloop'
  /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/parallel-1.4.1/lib/parallel.rb:273:in block (2 levels) in work_in_processes' /home/nsgill/projects/canvas-lms/vendor/bundle/ruby/2.2.0/gems/parallel-1.4.1/lib/parallel.rb:138:inblock (2 levels) in in_threads'
  Tasks: TOP =&gt; canvas:compile_assets
  </code></pre>
  
  <h2>when I am trying to "node-gyp rebuild" I am getting following error:-</h2>
  
  <pre><code>gyp: binding.gyp not found (cwd: /home/nsgill/projects/canvas-lms) while trying to load binding.gyp
  gyp ERR! configure error 
  </code></pre>
  
  <h2>    gyp ERR! stack Error: gyp failed with exit code: 1</h2>
  
  <p>I tried all possible solutions. I have tried this with different versions of npm but facing the same issue.</p>
  
  <p>Please let me know if you have any solution.</p>