instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.7k stars 2.51k forks source link

can not compile js #697

Closed vendi95 closed 9 years ago

vendi95 commented 9 years ago

Hello,

I can't manage to compile canvas completely. I can run the server, but several js files missing. I've followed the Quick start tutorial, and I am getting the messages below when running $GEM_HOME/bin/bundle exec rake canvas:compile_assets. Thank you for your help.

vendi95@vendi95-Inspiron-3521:~/canvas$ $GEM_HOME/bin/bundle exec rake canvas:compile_assets --trace
** Invoke canvas:compile_assets (first_time)
** Execute canvas:compile_assets
--> Starting: 'Making sure node_modules are up to date'
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN prefer global coffee-script@1.10.0 should be installed with -g
npm WARN EPEERINVALID i18nliner-handlebars@0.1.0 requires a peer of jsdom@~0.8.10 but none was installed.
npm WARN prefer global node-gyp@3.0.3 should be installed with -g
--> Finished: 'Making sure node_modules are up to date' in 18.599489032
--> Starting: 'compile css (including custom brands)'
no sass changes detected
--> Finished: 'compile css (including custom brands)' in 1.131601003
working in 4 processes
--> Starting: 'compile coffee, js 18n, and run r.js optimizer'--> Starting: 'css:styleguide'

--> Starting: 'js:generate'
** Invoke js:generate (first_time)
** Invoke css:styleguide (first_time)
** Execute js:generate
** Execute css:styleguide
--> creating styleguide
--> Starting: 'Generate documentation [yardoc]'
** Invoke doc:api (first_time)
** Execute doc:api
** 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.pp/controllers/courses_controller.rb.
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'...
# writing file: app/views/info/styleguide.html.erb.rb..
--> Finished: 'css:styleguide' in 8.59850663
[warn]: @param tag has unknown parameter name: conversations 
    in file `app/controllers/quizzes/quiz_submission_users_controller.rb' near line 139
Client app 'canvas_quizzes' was built successfully.
--> Generating plugin extensions--> Creating ember app bundles--> Compiling React JSX--> Pre-compiling handlebars templates
** Invoke jst:compile (first_time)

** Execute jst:compile
--> Pre-compiling ember handlebars templates** Invoke js:jsx (first_time)
** Execute js:jsx

** Invoke js:generate_extensions (first_time)
** Invoke jst:ember (first_time)

** Execute jst:ember
** Invoke js:bundle_ember_apps (first_time)
** Execute js:generate_extensions
** Execute js:bundle_ember_apps
--> Generating plugin extensions finished in 0.008545517
--> Creating ember app bundles finished in 0.022668627
--> Compiling CoffeeScript with 'coffee' binary
/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13
    return jsdom().parentWindow.document;
                               ^

TypeError: Cannot read property 'document' of undefined
    at /home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13:32
    at Object.<anonymous> (/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:15:3)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452: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> (/home/vendi95/canvas/gems/canvas_i18nliner/bin/prepare_hbs:7:20)
    at Module._compile (module.js:434:26)
/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13
    return jsdom().parentWindow.document;
                               ^

TypeError: Cannot read property 'document' of undefined
    at /home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13:32
    at Object.<anonymous> (/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:15:3)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452: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> (/home/vendi95/canvas/gems/canvas_i18nliner/bin/prepare_hbs:7:20)
    at Module._compile (module.js:434:26)
/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13
    return jsdom().parentWindow.document;
                               ^

TypeError: Cannot read property 'document' of undefined
    at /home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13:32
    at Object.<anonymous> (/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:15:3)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452: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> (/home/vendi95/canvas/gems/canvas_i18nliner/bin/prepare_hbs:7:20)
    at Module._compile (module.js:434:26)
/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13
    return jsdom().parentWindow.document;
                               ^

TypeError: Cannot read property 'document' of undefined
    at /home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13:32
    at Object.<anonymous> (/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:15:3)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452: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> (/home/vendi95/canvas/gems/canvas_i18nliner/bin/prepare_hbs:7:20)
    at Module._compile (module.js:434:26)
/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13
    return jsdom().parentWindow.document;
                               ^

TypeError: Cannot read property 'document' of undefined
    at /home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:13:32
    at Object.<anonymous> (/home/vendi95/canvas/gems/canvas_i18nliner/node_modules/i18nliner-handlebars/dist/lib/pre_processor.js:15:3)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452: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> (/home/vendi95/canvas/gems/canvas_i18nliner/bin/prepare_hbs:7:20)
    at Module._compile (module.js:434:26)
⌏ Generating /home/vendi95/canvas/public/doc/api/file.homework_submission_tools.⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............--> Compiling React JSX finished in 9.505342248
⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌎ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌏ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌌ Generating /home/vendi95/canvas/public/doc/api/all_resources.html.............................................................................................⌍ Generating /home/vendi95/canvas/public/doc/api/announcement_external_feeds.htmFiles:          96
Modules:         0 (    0 undocumented)
Classes:        95 (   30 undocumented)
Constants:       0 (    0 undocumented)
Methods:       417 (    7 undocumented)
 92.77% documented
API Documentation successfully generated in public/doc/api
See public/doc/api/index.html
--> Finished: 'Generate documentation [yardoc]' in 38.472956141
rake aborted!
Undumpable Exception -- #<EOFError: end of file reached>
/var/lib/gems/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:63:in `work'
/var/lib/gems/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:280:in `block (4 levels) in work_in_processes'
/var/lib/gems/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:447:in `with_instrumentation'
/var/lib/gems/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:279:in `block (3 levels) in work_in_processes'
/var/lib/gems/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:273:in `loop'
/var/lib/gems/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:273:in `block (2 levels) in work_in_processes'
/var/lib/gems/2.1.0/gems/parallel-1.4.1/lib/parallel.rb:138:in `block (2 levels) in in_threads'
Tasks: TOP => canvas:compile_assets
djbender commented 9 years ago

Hi there! A couple questions for diagnosing your problem:

Thanks!

lidorcg commented 9 years ago

i have the same problem: -node v0.12.7 -ruby 2.1.2p95 -kubuntu 15.04

i managed to fix it by removing jsdom:

$ npm remove jsdom

and installing an older version:

$ npm install jsdom@3.1.2

G.L