btey / openproject-gitlab-integration

OpenProject module for integration with Gitlab
GNU General Public License v3.0
84 stars 18 forks source link

Fails to build on OpenProject 12.5 #30

Closed jakeh999 closed 1 year ago

jakeh999 commented 1 year ago

I receive the following error when executing "RUN ./docker/prod/setup/postinstall.sh" while trying to build a docker image of OpenProject 12.5. It works fine with previous versions.

#0 534.3 ./src/app/features/plugins/linked/openproject-gitlab_integration/main.ts:34:12-26 - Error: export 'OPSharedModule' (imported as 'OPSharedModule') was not found in 'core-app/shared/shared.module' (possible exports: OpSharedModule, bootstrapModule)
#0 534.3 
#0 534.3 Error: src/app/app.module.ts:173:5 - error NG6002: This import contains errors, which may affect components that depend on this NgModule.
#0 534.3 
#0 534.3 173     LinkedPluginsModule,
#0 534.3         ~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked-plugins.module.ts:47:9 - error NG6002: 'PluginModule' does not appear to be an NgModule class.
#0 534.3 
#0 534.3 47         OpenprojectGitlabIntegration,
#0 534.3            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/main.ts:95:14
#0 534.3     95 export class PluginModule {
#0 534.3                     ~~~~~~~~~~~~
#0 534.3     Is it missing an @NgModule annotation?
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.template.html:1:1 - error NG8001: 'tab-header' is not a known element:
#0 534.3 1. If 'tab-header' is an Angular component, then verify that it is part of this module.
#0 534.3 2. If 'tab-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 
#0 534.3 1 <tab-header [workPackage]="workPackage"></tab-header>
#0 534.3   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.component.ts:38:16
#0 534.3     38   templateUrl: './gitlab-tab.template.html'
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component GitlabTabComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.template.html:1:13 - error NG8002: Can't bind to 'workPackage' since it isn't a known property of 'tab-header'.
#0 534.3 1. If 'tab-header' is an Angular component and it has 'workPackage' input, then verify that it is part of this module.
#0 534.3 2. If 'tab-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
#0 534.3 
#0 534.3 1 <tab-header [workPackage]="workPackage"></tab-header>
#0 534.3               ~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.component.ts:38:16
#0 534.3     38   templateUrl: './gitlab-tab.template.html'
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component GitlabTabComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.template.html:2:1 - error NG8001: 'tab-mrs' is not a known element:
#0 534.3 1. If 'tab-mrs' is an Angular component, then verify that it is part of this module.
#0 534.3 2. If 'tab-mrs' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 
#0 534.3 2 <tab-mrs [workPackage]="workPackage"></tab-mrs>
#0 534.3   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.component.ts:38:16
#0 534.3     38   templateUrl: './gitlab-tab.template.html'
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component GitlabTabComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.template.html:2:10 - error NG8002: Can't bind to 'workPackage' since it isn't a known property of 'tab-mrs'.
#0 534.3 1. If 'tab-mrs' is an Angular component and it has 'workPackage' input, then verify that it is part of this module.
#0 534.3 2. If 'tab-mrs' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
#0 534.3 
#0 534.3 2 <tab-mrs [workPackage]="workPackage"></tab-mrs>
#0 534.3            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/gitlab-tab/gitlab-tab.component.ts:38:16
#0 534.3     38   templateUrl: './gitlab-tab.template.html'
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component GitlabTabComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/main.ts:31:10 - error TS2724: '"core-app/shared/shared.module"' has no exported member named 'OPSharedModule'. Did you mean 'OpSharedModule'?
#0 534.3 
#0 534.3 31 import { OPSharedModule } from 'core-app/shared/shared.module';
#0 534.3             ~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/shared/shared.module.ts:300:14
#0 534.3     300 export class OpSharedModule {
#0 534.3                      ~~~~~~~~~~~~~~
#0 534.3     'OpSharedModule' is declared here.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/main.ts:72:12 - error NG1010: Value at position 0 in the NgModule.imports of PluginModule is not a reference
#0 534.3   Value could not be determined statically.
#0 534.3 
#0 534.3 72   imports: [
#0 534.3               ~
#0 534.3 73     OPSharedModule,
#0 534.3    ~~~~~~~~~~~~~~~~~~~
#0 534.3 74     OpenprojectTabsModule,
#0 534.3    ~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 75   ],
#0 534.3    ~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/main.ts:73:5
#0 534.3     73     OPSharedModule,
#0 534.3            ~~~~~~~~~~~~~~
#0 534.3     Unknown reference.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.html:31:5 - error NG8001: 'op-date-time' is not a known element:
#0 534.3 1. If 'op-date-time' is an Angular component, then verify that it is part of this module.
#0 534.3 2. If 'op-date-time' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 
#0 534.3 31     <op-date-time [dateTimeValue]="mergeRequest.gitlabUpdatedAt"></op-date-time>
#0 534.3        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.ts:38:16
#0 534.3     38   templateUrl: './merge-request.component.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component MergeRequestComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.html:31:19 - error NG8002: Can't bind to 'dateTimeValue' since it isn't a known property of 'op-date-time'.
#0 534.3 1. If 'op-date-time' is an Angular component and it has 'dateTimeValue' input, then verify that it is part of this module.
#0 534.3 2. If 'op-date-time' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.
#0 534.3 
#0 534.3 31     <op-date-time [dateTimeValue]="mergeRequest.gitlabUpdatedAt"></op-date-time>
#0 534.3                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.ts:38:16
#0 534.3     38   templateUrl: './merge-request.component.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component MergeRequestComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.html:35:39 - error NG8002: Can't bind to 'ngClass' since it isn't a known property of 'span'.
#0 534.3 
#0 534.3 35 <span class='op-merge-request--state' [ngClass]="'op-merge-request--state_' + state">
#0 534.3                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.ts:38:16
#0 534.3     38   templateUrl: './merge-request.component.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component MergeRequestComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.html:36:3 - error NG8001: 'op-icon' is not a known element:
#0 534.3 1. If 'op-icon' is an Angular component, then verify that it is part of this module.
#0 534.3 2. If 'op-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 
#0 534.3 36   <op-icon icon-classes="button--icon icon-merge-branch"></op-icon>
#0 534.3      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/merge-request/merge-request.component.ts:38:16
#0 534.3     38   templateUrl: './merge-request.component.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component MergeRequestComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.template.html:3:5 - error NG8001: 'op-icon' is not a known element:
#0 534.3 1. If 'op-icon' is an Angular component, then verify that it is part of this module.
#0 534.3 2. If 'op-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 
#0 534.3 3     <op-icon icon-classes="button--icon icon-merge-branch"></op-icon>
#0 534.3       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.component.ts:36:16
#0 534.3     36   templateUrl: './tab-header.template.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component TabHeaderComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.template.html:12:11 - error NG8002: Can't bind to 'gitActionsCopyDropdown-workPackage' since it isn't a known property of 'button'.
#0 534.3 
#0 534.3 12           [gitActionsCopyDropdown-workPackage]="workPackage">
#0 534.3              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.component.ts:36:16
#0 534.3     36   templateUrl: './tab-header.template.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component TabHeaderComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.template.html:13:9 - error NG8001: 'op-icon' is not a known element:
#0 534.3 1. If 'op-icon' is an Angular component, then verify that it is part of this module.
#0 534.3 2. If 'op-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 
#0 534.3 13         <op-icon icon-classes="button--icon icon-console-light"></op-icon>
#0 534.3            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.component.ts:36:16
#0 534.3     36   templateUrl: './tab-header.template.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component TabHeaderComponent.
#0 534.3 
#0 534.3 
#0 534.3 Error: src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.template.html:17:9 - error NG8001: 'op-icon' is not a known element:
#0 534.3 1. If 'op-icon' is an Angular component, then verify that it is part of this module.
#0 534.3 2. If 'op-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
#0 534.3 
#0 534.3 17         <op-icon icon-classes="button--icon icon-small icon-pulldown hidden-for-mobile"></op-icon>
#0 534.3            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3 
#0 534.3   src/app/features/plugins/linked/openproject-gitlab_integration/tab-header/tab-header.component.ts:36:16
#0 534.3     36   templateUrl: './tab-header.template.html',
#0 534.3                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 534.3     Error occurs in the template of component TabHeaderComponent.
#0 534.3 
#0 534.3 
#0 534.3 
#0 538.9 rake aborted!
#0 538.9 Failed to compile angular frontend: 1
#0 539.0 /app/lib/tasks/assets.rake:68:in `block (4 levels) in <top (required)>'
#0 539.0 /app/lib/tasks/assets.rake:67:in `block (3 levels) in <top (required)>'
#0 539.0 /app/lib/tasks/assets.rake:66:in `chdir'
#0 539.0 /app/lib/tasks/assets.rake:66:in `block (2 levels) in <top (required)>'
#0 539.0 /app/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/cli/exec.rb:58:in `load'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/cli/exec.rb:58:in `kernel_load'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/cli/exec.rb:23:in `run'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/cli.rb:492:in `exec'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/cli.rb:34:in `dispatch'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/cli.rb:28:in `start'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/exe/bundle:45:in `block in <top (required)>'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
#0 539.0 /usr/local/bundle/gems/bundler-2.4.7/exe/bundle:33:in `<top (required)>'
#0 539.0 /usr/local/bundle/bin/bundle:25:in `load'
#0 539.0 /usr/local/bundle/bin/bundle:25:in `<main>'
#0 539.0 Tasks: TOP => assets:precompile => assets:compile_environment => assets:prepare_op => assets:angular
#0 539.0 (See full trace by running task with --trace)
------
Dockerfile:16
--------------------
  14 |     
  15 |     RUN bundle config unset deployment && bundle install && bundle config set deployment 'true'
  16 | >>> RUN ./docker/prod/setup/postinstall.sh
  17 |     
  18 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c ./docker/prod/setup/postinstall.sh" did not complete successfully: exit code: 1

Please let me know if you have any ideas, or need any further details. Thanks!

alexander-mai commented 1 year ago

OPSharedModule was renamed to OpSharedModule: https://github.com/opf/openproject/commit/0b4bcad06175b375fa7cd9dced5557893bbddd8c

btey commented 1 year ago

Hi @alexander-mai

Thanks for trying it out and detecting the change. I have published this fix in version 2.0.9 and tested the build process with OpenProject v12.5.1.

Regards, Ben

alexander-mai commented 1 year ago

Thank you @btey. This was really fast. I planned to create a PR today. But now it is no longer necessary. 👍