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.

Custom pipes not found within Angular CLI Library

See original GitHub issue

Describe the bug I’m getting an error The pipe 'reverseString' could not be found in the .HTML file that uses the custom pipe but the application builds and runs fine during runtime.

The bug can be found in this project: Angular Library Demo

To Reproduce

Steps to reproduce the behavior:

  1. Make sure you have Angular Language Service extension installed and enabled
  2. Clone https://github.com/18clans/demo-pipe
  3. npm i
  4. ng build demo-lib
  5. Error will be in src > app > app.component.html

Expected behavior

When you navigate to src > app > app.component.html, you should see an error when your mouse hovers over the custom pipe.

Logs

No error logs

Screenshots

Screen Shot 2020-08-13 at 2 00 37 PM

Additional context Old issue

I tested this out with a stand-alone Angular project and everything works as it should. There was no error in the .HTML file and it ran just fine. An example project can be found here: Working demo project.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
andrius-pracommented, Aug 14, 2020

I see 3 issues in you demo project.

  1. It is missing required packages: ng-packagr, tsickle
  2. You can’t use typescript Barrel in projects\demo-lib\src\public_api.ts and all its dependencies. You need to use full path to file or add \index to your export statements. ex: use export * from "./reverse-string/index"; instead of export * from "./reverse-string";. (ng-packagr/ng-packagr#195)
  3. angular language service doesn’t support ivy library packages. You can disable ivy in you library by adding "enableIvy": false to angularCompilerOptions in projects\demo-lib\tsconfig.lib.json

I have created branch with all changes.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 17, 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

NG0302: Pipe not found! - Angular
Angular can't find a pipe with this name. The pipe referenced in the template has not been named or declared properly. In order...
Read more >
Angular custom pipe not working 'pipe not found'
I am trying to create a custom pipe in my Angular app but keep getting the 'no pipe found with name "currencyFormat"' error...
Read more >
Angular library: Module not found error | by Tanya Gray
This project is an Angular app and Angular library in one project. The app consumes the library directly, not via npm.
Read more >
[Debugging] The pipe {name} could not be found - YouTube
In this video, you'll learn what the error "The pipe {name} could not be found " means, how to debug it, and prevent...
Read more >
Custom Pipes in Angular With Examples
If we are not passing any parameter to the custom pipe, angular cli will return following error. {{ 100 | power}}. error TS2554:...
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