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

RAILS_ENV=production bundle exec rake canvas:compile_assets rm permission error [urgent plz] #2286

Open geet-h17 opened 10 months ago

geet-h17 commented 10 months ago

Summary:

while running RAILS_ENV=production bundle exec rake canvas:compile_assets it is giving a huge error list mostly consisting of line like @instructure/filter-console-messages has no build:canvas script, skipping missing @canvas/backbone-input-view has no build:canvas script, skipping missing @canvas/backbone-input-filter-view has no build:canvas script, skipping missing @instructure/canvas-media/courses_controller.rb................. $ yarn installTranslations && yarn run build:es && yarn run build:cjs @instructure/grading-utils $ yarn build @instructure/k5uploader $ babel -d es src & babel --config-file=./babel.config.cjs.js -d lib src @canvas/engine $ yarn run check && yarn run lint @instructure/canvas-rcers/courses_controller.rb.................. $ scripts/build-canvas | rm: cannot remove 'es/bridge/tests/bridge.test.d.ts': Permission denied | rm: cannot remove 'es/bridge/Bridge.d.ts': Permission denied | rm: cannot remove 'es/bridge/index.d.ts': Permission denied | rm: cannot remove 'es/bridge/index.js': Permission denied | rm: cannot remove 'es/bridge/Bridge.js': Permission denied | rm: cannot remove 'es/canvasFileBrowser/FileBrowser.js': Permission denied | rm: cannot remove 'es/canvasFileBrowser/tests/filesHelpers.d.ts': Permission denied | rm: cannot remove 'es/canvasFileBrowser/tests/FileBrowser.test.d.ts': Permission denied | rm: cannot remove 'es/canvasFileBrowser/FileBrowser.d.ts': Permission denied | rm: cannot remove 'es/canvasFileBrowser/en-US.d.ts': Permission denied | rm: cannot remove 'es/canvasFileBrowser/en-US.js': Permission denied | rm: cannot remove 'es/common/fileUrl.js': Permission denied | rm: cannot remove 'es/common/scroll.d.ts': Permission denied | rm: cannot remove 'es/common/browser.js': Permission denied | rm: cannot remove 'es/common/getCookie.d.ts': Permission denied`

Steps to reproduce:

  1. Clone the repo and follow the guide for ubuntu 20(with updated ruby )
  2. reach till the RAILS_ENV=production bundle exec rake canvas:compile_assets
  3. run it

Expected behavior:

Successfully completing the process

Actual behavior:

rm cannot remove errors

Additional notes:

i have git checkout on prod . all these are rm files are supposedly on scripts/build-canvas

geet-h17 commented 10 months ago

tried running the command with sudo , then its giving the erroe like in #2280

Maclenn77 commented 7 months ago

Did you manage to solve the issue? Instead of running as sudoer, try to change the ownership of the carpets with the issue.


user=$(whoami)

sudo chown "$user:$user" -R /path/to/folders

Also, it seems that you have yarn installed globally as root, move to your user path or use a package manager instead.