canvas-lms icon indicating copy to clipboard operation
canvas-lms copied to clipboard

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

Open geet-h17 opened this issue 2 years ago • 2 comments

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 avatar Nov 08 '23 19:11 geet-h17

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

geet-h17 avatar Nov 08 '23 19:11 geet-h17

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.

Maclenn77 avatar Feb 20 '24 20:02 Maclenn77