instructure / canvas-lms

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

Unable to compile assets for Latest Releases: Parallel::UndumpableException: RuntimeError: error running yarn install #1965

Open Higherings opened 2 years ago

Higherings commented 2 years ago

Summary:

I have a Canvas LMS self hosted installation, June 2021 version, and is working nicely. I tried to update to the latest release of October but it gave A LOT of conflicts using git, so I decide to download the zip file and update the configuration files. Bundle install worked good, yarns install also worked good, output: Report: 5 packages finished build:canvas successfully: @instructure/js-utils, @instructure/k5uploader, @instructure/canvas-planner, @instructure/canvas-media, @instructure/canvas-rce

But when I tried to compile it gave the following error: Report: 1 packages finished build:canvas with error: @instructure/canvas-rce 4 packages have been cancelled running build:canvas: @instructure/js-utils, @instructure/k5uploader, @instructure/canvas-planner, @instructure/canvas-media

rake aborted! Parallel::UndumpableException: RuntimeError: error running yarn install /var/canvas/lib/tasks/js.rake:32:in block (2 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:76:inblock (6 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:12:in log_time' /var/canvas/lib/tasks/canvas.rake:79:inblock (5 levels) in <top (required)>' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:515:in call_with_index' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:485:inprocess_incoming_jobs' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:465:in block in worker' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:456:infork' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:456:in worker' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:447:inblock in create_workers' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:446:in each' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:446:ineach_with_index' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:446:in create_workers' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:386:inwork_in_processes' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:289:in map' /var/canvas/lib/tasks/canvas.rake:72:inblock (4 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:71:in each' /var/canvas/lib/tasks/canvas.rake:71:inblock (3 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:70:in block (2 levels) in <top (required)>' /var/lib/gems/2.6.0/gems/rake-13.0.3/exe/rake:27:in<top (required)>' Tasks: TOP => canvas:compile_assets

Steps to reproduce:

  1. Download zip file for latest October Release
  2. Try to compile the assets with: RAILS_ENV=production bundle exec rake canvas:compile_assets
  3. See error

Expected behavior:

Assets compiled.

Actual behavior:

Fail with error.

Additional notes:

I have tried different zip files for different releases but all fails the same. I am using the same server were I first install the Canvas, and that first installation compiled without errors.

Higherings commented 2 years ago

I nuke the installation with nuke_node script and now it went a little but further but still fails with:

ERROR in ./ui/shims/dummyI18nResource.js (./frontend_build/i18n.js?!./ui/shims/dummyI18nResource.js) Module not found: Error: Can't resolve 'translations/' in '/var/canvas/ui/shims' @ ./ui/shims/dummyI18nResource.js (./frontend_build/i18n.js?*!./ui/shims/dummyI18nResource.js) 4:6-30 @ ./ui/shared/notification-preferences/react/NotificationPreferencesContextSelect.js @ ./ui/shared/notification-preferences/react/NotificationPreferencesContextSelectQuery.js @ ./ui/shared/notification-preferences/react/index.js @ ./ui/features/course_notification_settings/react/CourseNotificationSettingsManager.js @ ./ui/features/course_notification_settings/react/CourseNotificationSettingsQuery.js @ ./ui/features/course_notification_settings/react/index.js @ ./ui/features/course_notification_settings/index.js @ ./node_modules/bundles-generated.js @ ./ui/index.js

and several other error later...

rake aborted! Parallel::UndumpableException: RuntimeError: Error running js:webpack_development: ABORTING /var/canvas/lib/tasks/js.rake:10:in block (2 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:76:inblock (6 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:12:in log_time' /var/canvas/lib/tasks/canvas.rake:79:inblock (5 levels) in <top (required)>' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:515:in call_with_index' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:485:inprocess_incoming_jobs' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:465:in block in worker' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:456:infork' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:456:in worker' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:447:inblock in create_workers' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:446:in each' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:446:ineach_with_index' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:446:in create_workers' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:386:inwork_in_processes' /var/lib/gems/2.6.0/gems/parallel-1.21.0/lib/parallel.rb:289:in map' /var/canvas/lib/tasks/canvas.rake:72:inblock (4 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:71:in each' /var/canvas/lib/tasks/canvas.rake:71:inblock (3 levels) in <top (required)>' /var/canvas/lib/tasks/canvas.rake:70:in block (2 levels) in <top (required)>' /var/lib/gems/2.6.0/gems/rake-13.0.3/exe/rake:27:in<top (required)>' Tasks: TOP => canvas:compile_assets

The server has now 32GB of RAM, so it is not because of resources.

AlbertoCRC commented 2 years ago

Did you get it fixed? The same thing happens to me with a server with 64 GB of RAM. I have tried it with Ubuntu 18 and Debian 10.

Higherings commented 2 years ago

Hello @AlbertoCRC, sorry, I'm still unable to make it work. I'm working with the release of June 2021, I have tried several releases to update, Octobre, November, the latest, but all fail at some point.

El dom, 28 nov 2021 a las 11:48, AlbertoCRC @.***>) escribió:

Did you get it fixed? The same thing happens to me with a server with 64 GB of RAM. I have tried it with Ubuntu 18 and Debian 10.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/instructure/canvas-lms/issues/1965#issuecomment-981124670, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZDRHL6STDQ3A7ELALLRP3UOJTNRANCNFSM5HOVOPGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Saludos, Iván García

AlbertoCRC commented 2 years ago

Thanks @Higherings for your information. Where or How I can download this release? I'd deploy last version. Only works corretly but I can't send email, canvas_init always gives me a error (Resource temporarily unavailable, cannot stat '/../config/environment.rb', and script/ruby console (for deploy Analitycs) don't exists.

Higherings commented 2 years ago

You can check the Releases, they use Tags for that, you can try with any tag (date) you like.

El mar, 30 nov 2021 a las 3:40, AlbertoCRC @.***>) escribió:

Thanks @Higherings https://github.com/Higherings for your information. Where or How I can download this release? I'd deploy last version. Only works corretly but I can't send email, canvas_init always gives me a error (Resource temporarily unavailable, cannot stat '/../config/environment.rb', and script/ruby console (for deploy Analitycs) don't exists.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/instructure/canvas-lms/issues/1965#issuecomment-982457852, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZDRHIYESYWMPZ4EEIUTSTUOSLYNANCNFSM5HOVOPGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Saludos, Iván García

AlbertoCRC commented 2 years ago

Thanks yo for your help. At least, i have got updown the last version. Only one problem: script/rails is missing but no problem.

The solution is verify the release of Ruby, bundler, yarn, node and psql.

lyvankien commented 2 years ago

I really need someone to help me install Canvas LMS for me. I will pay for that. If anyone can do it, please contact email: lyvankien@gmail.com I live in Vietnam