Skip to content

Ivy and reflect-metadata causes TypeError #16870

@noxi515

Description

@noxi515

🐞 bug report

Affected Package

not sure.

Is this a regression?

Yes.
Angular8 and Angular9 (ivy disabled) works well.

Description

Using both @grapecity/wijmo.angular2.all library and import-metadata causes TypeError on bootstrap.

🔬 Minimal Reproduction

  1. ng new to generate new project.
  2. npm i -P @grapecity/wijmo.angular2.all to install library.
  3. Add WjGridModule to AppModule, and edit app.component.html.
  4. Add import 'reflect-metadata' in main.ts

https://github.com/noxi515/angular-wijmo-reflect-issue

🔥 Exception or Error


Reflect.js:541 Uncaught TypeError: decorator is not a function
    at DecorateConstructor (Reflect.js:541)
    at Object.decorate (Reflect.js:130)
    at push../node_modules/@grapecity/wijmo.angular2.grid/__ivy_ngcc__/index.js.__decorate (index.js:18)
    at index.js:45
    at Object../node_modules/@grapecity/wijmo.angular2.grid/__ivy_ngcc__/index.js (index.js:45)
    at __webpack_require__ (bootstrap:79)
    at Module../src/app/app.module.ts (app.module.ts:1)
    at __webpack_require__ (bootstrap:79)
    at Module../src/main.ts (main.ts:1)
    at __webpack_require__ (bootstrap:79)

🌍 Your Environment

Angular Version:


Angular CLI: 9.0.1
Node: 12.14.1
OS: win32 x64

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

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.1
@angular-devkit/build-angular     0.900.1
@angular-devkit/build-optimizer   0.900.1
@angular-devkit/build-webpack     0.900.1
@angular-devkit/core              9.0.1
@angular-devkit/schematics        9.0.1
@angular/cli                      9.0.1
@ngtools/webpack                  9.0.1
@schematics/angular               9.0.1
@schematics/update                0.900.1
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions