Content
assets:precompile fails
Added by Markus Blaser over 5 years ago
I have another issue. I try to precompile all assets but I get always this error.
RAILS_ENV=production rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Invoke assets:compile_environment (first_time)
** Invoke assets:prepare_op (first_time)
** Invoke assets:angular (first_time)
** Execute assets:angular
Linking frontend plugins
** Invoke openproject:plugins:register_frontend (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute openproject:plugins:register_frontend
Cleaning linked target directory /opt/openproject/frontend/src/app/modules/plugins/linked
Linking frontend of OpenProject plugin openproject-avatars to /opt/openproject/frontend/src/app/modules/plugins/linked/openproject-avatars.
Linking frontend of OpenProject plugin openproject-costs to /opt/openproject/frontend/src/app/modules/plugins/linked/openproject-costs.
Linking frontend of OpenProject plugin openproject-documents to /opt/openproject/frontend/src/app/modules/plugins/linked/openproject-documents.
Regenerating frontend plugin registry /opt/openproject/frontend/src/app/modules/plugins/linked-plugins.module.ts.
Building angular frontend
npm run build
rake aborted!
Failed to compile angular frontend: 127
/opt/openproject/lib/tasks/assets.rake:66:in `block (4 levels) in <top (required)>'
/usr/lib/ruby/vendor_ruby/rake/file_utils.rb:57:in `sh'
/opt/openproject/lib/tasks/assets.rake:65:in `block (3 levels) in <top (required)>'
/opt/openproject/lib/tasks/assets.rake:64:in `chdir'
/opt/openproject/lib/tasks/assets.rake:64:in `block (2 levels) in <top (required)>'
/usr/lib/ruby/vendor_ruby/rake/task.rb:271:in `block in execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:271:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:271:in `execute'
/usr/lib/ruby/vendor_ruby/rake/task.rb:213:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:193:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:237:in `block in invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:212:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:193:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:237:in `block in invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:212:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:193:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:237:in `block in invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `each'
/usr/lib/ruby/vendor_ruby/rake/task.rb:235:in `invoke_prerequisites'
/usr/lib/ruby/vendor_ruby/rake/task.rb:212:in `block in invoke_with_call_chain'
/usr/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/usr/lib/ruby/vendor_ruby/rake/task.rb:193:in `invoke_with_call_chain'
/usr/lib/ruby/vendor_ruby/rake/task.rb:182:in `invoke'
/usr/lib/ruby/vendor_ruby/rake/application.rb:160:in `invoke_task'
/usr/lib/ruby/vendor_ruby/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:116:in `each'
/usr/lib/ruby/vendor_ruby/rake/application.rb:116:in `block in top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:125:in `run_with_threads'
/usr/lib/ruby/vendor_ruby/rake/application.rb:110:in `top_level'
/usr/lib/ruby/vendor_ruby/rake/application.rb:83:in `block in run'
/usr/lib/ruby/vendor_ruby/rake/application.rb:186:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:80:in `run'
/usr/bin/rake:27:in `<main>'
Tasks: TOP => assets:precompile => assets:compile_environment => assets:prepare_op => assets:angular
Replies (4)
Hi Markus,
what is output when you manually run
cd frontend && npm run build
?I assume that you do not have the npm frontend dependencies installed, or some other error happens during compilation of frontend assets (not enough RAM, possibly)
Best
Oliver
With that command I found many packages which were missing. However now I have another issue and I don't know why. It tells me that I have to install angulare/core. That I did and also the dependeny rxjs and zone.js but still doesn't work.
Hi Markus,
let's make one step back. Why do you need to run assets:precompile?
Best
Oliver
My problem was that I couldn't see any pictures when I openend the webpage.