question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Weird compilation errors during the update from Angular 8.3.15 to Angular 9 RC7

See original GitHub issue

Affected Package

Not sure

Is this a regression?

Yes, everything was working fine in Angular 8.3.15

Description

After I executed ng update @angular/cli @angular/core --next I got the following errors:

    Error: error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.
    error TS100: Unexpected value 'OrderlyWebComponentsModule in E:/.../orderly-web-apps/dist/orderly-web-components/lib/orderly-web-components.module.d.ts' imported by the module 'AppModule in E:/.../orderly-web-apps/projects/restaurant-admin-web/src/app/app.module.ts'. Please add a @NgModule annotation.
    error TS100: UpdateUserProfileComponent cannot be used as an entry component.

First, there are no details about these errors:

    error TS100: Error during template compile of 'RoutingHelper'
      Function calls are not supported in decorators but 'RestaurantManagerRoutingConstants' was called.

I have no idea why it stopped compiling. It would be great to get at least file name where this error happened.

Second, all my modules are attributed with @NgModule. OrderlyWebComponentsModule is a separate library with commonly used components and is also decorated as following:

@NgModule({
            declarations: [
              ...
              UpdateUserProfileComponent,
              ...
            ],
            imports: [ ... ],
            exports: [
              ...
              UpdateUserProfileComponent,
              ...
            ]
          })
export class OrderlyWebComponentsModule {}

public-api.ts file contains following references

...
export * from './lib/update-user-profile/update-user-profile.component';
...
export * from './lib/orderly-web-components.module';

Therefore the last error doesn’t make any sense:

error TS100: Unexpected value 'OrderlyWebComponentsModule in E:/PROJECTS/Orderly/Orderly.AngularClient/AngularApps/orderly-web-apps/dist/orderly-web-components/lib/orderly-web-components.module.d.ts' imported by the module 'AppModule in E:/PROJECTS/Orderly/Orderly.AngularClient/AngularApps/orderly-web-apps/projects/restaurant-admin-web/src/app/app.module.ts'. Please add a @NgModule annotation.

🔬 Minimal Reproduction

Still not sure what causes this behavior. In my case I just have one local library that is imported into a project.

🌍 Your Environment

Angular Version:


Angular CLI: 9.0.0-rc.7
Node: 10.16.3
OS: win32 x64

Angular: 9.0.0-rc.7
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.900.0-rc.7
@angular-devkit/build-angular      0.900.0-rc.7
@angular-devkit/build-ng-packagr   0.900.0-rc.7
@angular-devkit/build-optimizer    0.900.0-rc.7
@angular-devkit/build-webpack      0.900.0-rc.7
@angular-devkit/core               9.0.0-rc.7
@angular-devkit/schematics         9.0.0-rc.7
@ngtools/webpack                   9.0.0-rc.7
@schematics/angular                9.0.0-rc.7
@schematics/update                 0.900.0-rc.7
ng-packagr                         9.0.0-rc.3
rxjs                               6.5.3
typescript                         3.6.4
webpack                            4.41.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mrtungdevcommented, Jan 1, 2020

@usarskyy aren’t entryComponents deprecated in NG9 ?

Yes, more deprecated detail: https://next.angular.io/guide/deprecations

0reactions
angular-automatic-lock-bot[bot]commented, Aug 2, 2020

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange error during compilation - Angular 9 - Stack Overflow
Stay on develop and do: git pull origin develop. then npm i. Probably "from above" they added things that need to be installed...
Read more >
@angular-devkit/schematics: Versions | Openbase
Full version history for @angular-devkit/schematics including change logs. ... enable error on unknown properties and elements in tests.
Read more >
system-sync_mirrors-fedora-base-fc29-x86_64 #1516 - Infra
... /yum/fedora-base-fc29/base/Packages/u/urdfdom-devel-0.4.2-9.fc29.i686.rpm ... python3-XStatic-Angular-Mock-1.2.1.1-12.fc29.noarch.rpm ...
Read more >
Machine Elements - Yumpu
8.1.9) may be found by locating, in the case of the swinging block ... 0a3 , etc., corresponding with angular displacements of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found