Content
Error rake assets:precompile openproject stable/6
Added by Stéphane V almost 8 years ago
Hello,
On a fresh install (Debian 8 Jessie, Ruby 2.3.0), there are multiple errors when executing rake db:precompile with openproject-ce stable/6
@ ERROR in [default]
File ‘/home/openproject/openproject-ce/vendored-plugins/openproject-costs/frontend/app/components/budget/cost-budget-subform.directive.ts’ is not under ‘rootDir’ ‘/home/openproject/openproject-ce/frontend/app’. ‘rootDir’ is expected to contain all source files.
ERROR in [default]
File ‘/home/openproject/openproject-ce/vendored-plugins/openproject-costs/frontend/app/components/budget/cost-unit-subform.directive.ts’ is not under ‘rootDir’ ‘/home/openproject/openproject-ce/frontend/app’. ‘rootDir’ is expected to contain all source files.
ERROR in [default]
File ‘/home/openproject/openproject-ce/vendored-plugins/openproject-costs/frontend/app/components/subform/cost-subform.directive.ts’ is not under ‘rootDir’ ‘/home/openproject/openproject-ce/frontend/app’. ‘rootDir’ is expected to contain all source files.
ERROR in [default]
File ‘/home/openproject/openproject-ce/vendored-plugins/openproject-costs/frontend/app/components/wp-display/field-types/wp-display-costs-by-type-field.module.ts’ is not under ‘rootDir’ ‘/home/openproject/openproject-ce/frontend/app’. ‘rootDir’ is expected to contain all source files.
ERROR in [default]
File ‘/home/openproject/openproject-ce/vendored-plugins/openproject-costs/frontend/app/components/wp-display/field-types/wp-display-currency-field.module.ts’ is not under ‘rootDir’ ‘/home/openproject/openproject-ce/frontend/app’. ‘rootDir’ is expected to contain all source files.
…………………
@
Replies (2)
I have to second this (and bump the thred up again).
We just wanted to upgrade from stable/5 to stable/6 on ubuntu and I ran into the same errors.
First I thought I might have missed somehow migrating components from one place to another, then I remembered, that this is a package install and I should not be needing to “move” anything.
Also, since this error is clearly related to TypeScript config I don’t feel quite comfortable to dig into this to deep. I just have no idea of how it works.. ;)
Just to make sure that this error was not related to a structural change in openproject files/folders, I purged the complete installation (excl. the database), deleted the installer.dat file and manually purged everything under /opt/openproject.
Then I installed stable/6 from repository, and voilá, same error occurred again.
Since the error description can be found all over google, github etc. it appears to me, that this should be easy to fix, once one know what he/she is doing.
I’d highly appreciate some guidance as to how this error introduces itself and how to fix it.
Thanks in advance and best regards,
Oliver
Hi Oliver,
the errors printed there are actually warnings from TypeScript about references made from plugins not being typesafe.
(The configuration in OpenProject 6.x let TypeScript only ‘see’ the core
frontend/
, and thus references in assets of plugins such as costs and backlogs caused the TS compiler to complain about a common root dir).This was an implication due to the Rails plugin engines + TypeScript frontend we employ that we weren’t able to clear up until TypeScript 2.1.
You can safely ignore these errors, the application should work fine. In the upcoming version, we resolved these warnings.
Best,
Oliver