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
Declaring a pipe in two modules does not produce a diagnostic [Importing pipes in sub modules does not compile] #33586
Comments
For information I had the same issue when trying to use PrimeNG I got a similar error to do with pipes |
Just incase its relevant im Lazy loading the module components with
|
The error itself has been improved in #33454 to generate a diagnostic instead, which at least should resolve the stacktrace (but still cause the compilation to fail. This will be released per rc.1. Regarding PrimeNG, it's not currently working, please follow #30565 for updates. The issue you're posting is unclear to me, in a sense that there's no known bugs around this area for the example you shared. I can imagine this is in combination with some library, in which case ngcc may be processing something incorrectly. Could you please share a repro, preferably through a Github repository? Thanks! |
Here is a repo with the pipe intentionally not working |
The issue here is that I've updated the title of this issue to reflect that and track this bug. |
OK cool is there a work around but if I don't include It in the sub module I get an error |
This was fixed in #34404! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Included working custom pipe, modules is in /modules/contact-manager for reference
use pipe in component template with {{ objectItem | json }}
get following error
ERROR in Error: Missing pipe: json at Context.getPipeByName (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:650:23) at TcbExpressionTranslator.resolve (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1114:37) at AstTranslator.maybeResolve (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1078:84) at AstTranslator.translate (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:69:33) at /Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:117:124 at Array.reduce (<anonymous>) at AstTranslator.visitInterpolation (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:117:36) at Interpolation.visit (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler/bundles/compiler.umd.js:6481:28) at AstTranslator.translate (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:73:24) at Object.astToTypescript (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/expression.js:49:27) at TcbExpressionTranslator.translate (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1078:33) at tcbExpression (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:1065:27) at TcbTextInterpolationOp.execute (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:288:24) at Scope.executeOp (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:866:26) at Scope.render (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:805:22) at Object.generateTypeCheckBlock (/Users/carlfearby/Dropbox/Angular Projects/Framework/node_modules/@angular/compiler-cli/src/ngtsc/typecheck/src/type_check_block.js:44:37)
pipe works fine in appModule level
env
Package Version
@angular-devkit/architect 0.900.0-next.16
@angular-devkit/build-angular 0.900.0-next.16
@angular-devkit/build-optimizer 0.900.0-next.16
@angular-devkit/build-webpack 0.900.0-next.16
@angular-devkit/core 9.0.0-next.16
@angular-devkit/schematics 9.0.0-next.16
@angular/cdk 8.2.3
@angular/cli 9.0.0-next.16
@ngtools/webpack 9.0.0-next.16
@schematics/angular 9.0.0-next.16
@schematics/update 0.900.0-next.16
rxjs 6.5.3
typescript 3.6.4
webpack 4.41.2
The text was updated successfully, but these errors were encountered: