Closed rmccown closed 7 years ago
I had a similar issue when I tried to upgrade our canvas install (had not been upgraded in a very long time). It's caused by the fact that canvas now uses a newer npm, which was not reflected anywhere in documentation. Here is what I did to fix this: rm -rf /var/canvas/node_modules
Next, remove your nodejs 0.12 install, Then go here: https://nodejs.org/en/download/current/ and get the Mac OS X package for NodeJS current (NOT LTS), which will install nodejs 6.0, which is what canvas needs now. Install that package, and reboot your machine.
Now: npm install bundle exec rake canvas:compile_assets RAILS_ENV=production
Post an update with how this turns out.
Closing due to lack of response.
I'm installing Canvas locally on OSX, and getting the following errors when running bundle exec rake canvas:compile_assets
--> Starting: 'Making sure node_modules are up to date' npm WARN i18nliner-handlebars@0.1.1 requires a peer of i18nliner@~0.1.0 but none was installed. npm WARN i18nliner-handlebars@0.1.1 requires a peer of jsdom@~0.8.10 but none was installed. npm WARN instructure-icons@0.0.8 requires a peer of react@^0.14.7 || ^15.0.0 but none was installed. npm WARN instructure-icons@0.0.8 requires a peer of react-dom@^0.14.7 || ^15.0.0 but none was installed. npm WARN instructure-ui@0.13.3 requires a peer of react@^0.14.7 || ~15.1.0 but none was installed. npm WARN instructure-ui@0.13.3 requires a peer of react-dom@^0.14.7 || ~15.1.0 but none was installed. npm WARN react-addons-css-transition-group@15.1.0 requires a peer of react@^15.1.0 but none was installed. npm WARN react-overlays@0.6.6 requires a peer of react@>=0.14.0 but none was installed. npm WARN react-overlays@0.6.6 requires a peer of react-dom@>=0.14.0 but none was installed. npm WARN react-prop-types@0.4.0 requires a peer of react@>=0.14.0 but none was installed. --> Finished: 'Making sure node_modules are up to date' in 5.599118094996811 --> Starting: 'compile css (including custom brands)' no sass changes detected --> Finished: 'compile css (including custom brands)' in 0.9212205670010007 working in 8 processes --> Starting: 'css:styleguide' --> Starting: 'compile coffee, js 18n, run r.js optimizer, and webpack' --> Starting: 'js:generate' --> Starting: 'Generate documentation [yardoc]' --> creating styleguide Building client app 'canvas_quizzes' Running 'npm install'... npm WARN react@0.10.0 requires a peer of envify@~1.2.0 but none was installed. npm WARN canvas_quizzes@1.0.0 No license field. ⌏ ParsinRunning 'npm run build'...controller.rb [error]: Unhandled exception in YARD::Handlers::Ruby::ModuleHandler: [error]: in
app/controllers/filters/polling.rb
:1:[error]: NoMethodError: undefined method
type' for 315904:Fixnum [error]: Stack trace: /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:460:in
block (2 levels) in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:in
block in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:in
on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'[error]: Unhandled exception in YARD::Handlers::Ruby::ClassHandler: [error]: in
app/controllers/login/otp_controller.rb
:24:[error]: NoMethodError: undefined method
type' for 315960:Fixnum [error]: Stack trace: /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:460:in
block (2 levels) in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:in
block in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:in
on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'[error]: Unhandled exception in YARD::Handlers::Ruby::ClassHandler: [error]: in
app/controllers/login/cas_controller.rb
:21:[error]: NoMethodError: undefined method
type' for 314312:Fixnum [error]: Stack trace: /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:460:in
block (2 levels) in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:in
block in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:in
on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'writing file: app/views/info/styleguide.html.erb.rb
--> Finished: 'css:styleguide' in 4.298611525002343 [error]: Unhandled exception in YARD::Handlers::Ruby::ModuleHandler: [error]: in
app/controllers/filters/grading_periods.rb
:1:[error]: NoMethodError: undefined method
type' for 29136:Fixnum [error]: Stack trace: /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:460:in
block (2 levels) in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:in
block in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:in
on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'[error]: Unhandled exception in YARD::Handlers::Ruby::ModuleHandler: [error]: in
app/controllers/filters/live_assessments.rb
:19:[error]: NoMethodError: undefined method
type' for 234168:Fixnum [error]: Stack trace: /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:460:in
block (2 levels) in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:in
block in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:in
on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'[error]: Unhandled exception in YARD::Handlers::Ruby::ModuleHandler: [error]: in
app/controllers/filters/quizzes.rb
:19:[error]: NoMethodError: undefined method
type' for 205296:Fixnum [error]: Stack trace: /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:460:in
block (2 levels) in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:458:in
block in on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:inmap!' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:454:in
on_params' /Users/bob/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/yard-0.8.7.6/lib/yard/parser/ruby/ruby_parser.rb:50:in `parse'Client app 'canvas_quizzes' was built successfully. --> Pre-compiling handlebars templates --> Generating plugin extensions --> Compiling React JSX --> Pre-compiling ember handlebars templates --> Creating ember app bundles --> Generating plugin extensions finished in 0.01284421699892846 --> Creating ember app bundles finished in 0.02516365499832318 --> Compiling CoffeeScript with 'coffee' binary --> Pre-compiling ember handlebars templates finished in 3.2487546720003593 --> Pre-compiling handlebars templates finished in 3.5365682699994068 --> Compiling CoffeeScript finished in 20.595133614999213 --> Compiling React JSX finished in 28.91767791700113 --> Finished: 'js:generate' in 39.78302297600021 --> Starting: 'i18n:generate_js' ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Finished in 8.32 seconds
2180 files, 4930 strings, 0 failures --> Finished: 'i18n:generate_js' in 13.150431496000238 --> Starting: 'js:build' --> Starting: 'js:webpack' --> Finished: 'js:webpack' in 4.0471000829711556e-05 --> Concatenating JavaScript bundles with r.js --> Concatenated JavaScript bundles in 155.28717698499895 --> Finished: 'js:build' in 155.30559431699658 --> Finished: 'compile coffee, js 18n, run r.js optimizer, and webpack' in 208.2395145800001 rake aborted! Undumpable Exception -- #<RuntimeError: couldn't find API link for api:CoursesController#index>
Tasks: TOP => canvas:compile_assets (See full trace by running task with --trace) bob@Bobs-MacBook-Pro:~/Projects/canvas{stable} $
Rails and Ruby versions: bob@Bobs-MacBook-Pro:~/Projects/canvas{stable} $ ruby -v ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] bob@Bobs-MacBook-Pro:~/Projects/code{beta-rc} $ rails -v Rails 4.2.6
The application runs, but I get asset errors/missing images/etc