Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Invalid constructor parameter decorator (es5 to es2015) #14

Closed
pgarzina opened this issue Oct 21, 2020 · 2 comments
Closed

Warning: Invalid constructor parameter decorator (es5 to es2015) #14

pgarzina opened this issue Oct 21, 2020 · 2 comments

Comments

@pgarzina
Copy link

Hello,

our CI broke when updating ngx-pendo from 1.3.0 to 1.5.1
Using angular 9.
Seems to be an issue because we are using es5 as the target in out tsconfig.json, while if we target es2015 the build compiles.
Since we skipped 1.4.0 I'm not sure when the issue 1st started happening and if this was intentional to ditch es5?

Thanks

Compiling ngx-pendo : module as esm5 Warning: Invalid constructor parameter decorator in /home/travis/build/Cognism/prospector-ui/node_modules/ngx-pendo/fesm2015/ngx-pendo.js: () => [ { type: undefined, decorators: [{ type: Inject, args: [NGX_PENDO_SETTINGS_TOKEN,] }] } ] Error: getInternalNameOfClass() called on a non-ES5 class: expected NgxPendoService to have an inner class declaration at Esm5ReflectionHost.getInternalNameOfClass (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/ngcc/src/host/esm5_host.js:88:23) at DelegatingReflectionHost.getInternalNameOfClass (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/ngcc/src/host/delegating_host.js:89:34) at extractInjectableMetadata (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/src/ngtsc/annotations/src/injectable.js:125:69) at InjectableDecoratorHandler.analyze (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/src/ngtsc/annotations/src/injectable.js:66:24) at NgccTraitCompiler.TraitCompiler.analyzeTrait (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/src/ngtsc/transform/src/compilation.js:345:40) at analyze (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/src/ngtsc/transform/src/compilation.js:297:58) at _loop_1 (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/src/ngtsc/transform/src/compilation.js:319:21) at NgccTraitCompiler.TraitCompiler.analyzeClass (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/src/ngtsc/transform/src/compilation.js:325:35) at NgccTraitCompiler.analyzeFile (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/ngcc/src/analysis/ngcc_trait_compiler.js:47:26) at DecorationAnalyzer.analyzeProgram (/home/travis/build/Cognism/prospector-ui/node_modules/@angular/compiler-cli/ngcc/src/analysis/decoration_analyzer.js:134:39) An unhandled exception occurred: NGCC failed.

@pgarzina
Copy link
Author

pgarzina commented Oct 21, 2020

Regardless, we'll move our app to es2015, so I guess you can close or delete the issue.

@yociduo
Copy link
Owner

yociduo commented Oct 22, 2020

If you want to continue use es5, you can disabled ivy in the tsconfig.
"angularCompilerOptions": { "enableIvy": false }

@yociduo yociduo closed this as completed Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants