angular: Pipes could not be found with Ivy enabled
This is an Ivy bug report.
I’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
Event with the correct imports and declarations I get the following error
The pipe 'async' could not be found ("
</div>
<div class="progress-bar" [ERROR ->]*ngIf="isProgressBarVisible$ | async"></div>
</div>
"):
Expected behavior
It should compile
What is the motivation / use case for changing the behavior?
Just checking the compiler status
Environment
Angular version: 7.0.0-rc.1
For Tooling issues:
- Node version: NodeJS 10.12
- TypeScript version: 3.1.3
Others:
This is an *Ivy* bug report. I reported it, because the status page says pipes should work. Feel free to close this issue, if it's not the right time to submit bug tickets.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 36 (20 by maintainers)
I have same problem, and turned off ivy too. The problem is with pipes
ERROR in : Template parse errors: The pipe 'date' could not be found...
.For turn off
ivy
, opentsconfig.json
and edit the key ivy to false.It’s failing for other reasons (first
could not resolve foreign function declaration: app.module.ts forRoot
, after fixModule not found: [object Object]
).Debug on Windows fails:
HostResourceLoader: host(C:\Repositories\admin/C:/Repositories/admin/src/ts/components/dashboard/dashboard.component.html) returned a Promise
So I’ll leave this here, maybe it helps the Angular developers.
The error
Error: Uncaught (in promise): Error: The pipe 'async' could not be found!
is still an issue for me as of 9.0.0-next.7Happens after I save a module (even without making changes to the module). Restarting ng serve fixes it.
I didn’t fix it, turned off ivy. It is still developed actively, eg. https://github.com/angular/angular/pull/27737
i’m having the same issues using latest angular 8 and angularfirebase
@JoostK, Thank you so much.
I have been pulling my hair out with this issue for months, having to restart my server on every template change was driving me insane. Chasing module imports thinking i have made some sort of error which I hadn’t of course.
You have made my Sunday. I moved to 9.0.0-next.5 and it solved it.
@ottodranik please test Ivy using the 9.0 preview releases, currently
9.0.0-next.6
is the latest. The issue you describe should have been resolved a while ago, but it’s not included in 8.x.When “enableIvy”: true Everything works fine until I make changes to the template file (html-file, not ts-file). After that hot reload fires -> Angular 8 crashes and doesn’t recognize any pipes (translate, async, etc.) until I do ng serve again.
In console I saw that new loaded chunks become smaller. For example: Before adding some changes in html-file -> 148 kB, after -> 145 kB Before adding some changes in html-file -> 698 kB, after -> 694 kB
Then I see an error in browser console about pipes (any pipe). For example:
you need to run run ngcc before you compile your code with ivy. checkout some of the ngcc integration tests in the repo. I hope that helps.
in general, there are still too many failing tests for us to resolve before we are ready to accept ivy related issues, so I’m going to close this one.
Well… seems fixed as of angular and cli 9.0.0-rc.3. I just closed the new issue. I’ll reopen if i experience it again…
I am facing the exact same issues…
@JoostK
Try
enableIvy: 'ngtsc'
to use the new compiler pipeline.I’m using 9.0.0-rc.3 and I declared a pipe in
AppModule
(the pipe itself resides in oursrc/shared/pipes
folder) and it keeps saying could not be found. Now I can’t even get the application to run, running into issue #33821.EDIT: this was also happening with Ivy disabled. I created a PipeModule, declared my pipe in that (instead of AppModule), and instead of importing the new PipeModule module to
AppModule
, I only imported it into the modules that used it, and it seems to be fixed. Still doesn’t work if I import it globally into AppModule and I have no idea why.@Splaktar I added CommonModule as you asked and it didnt fix the issue. I also created a new issue https://github.com/angular/angular/issues/33950
@Splaktar
I made an app to reproduce the error https://github.com/tuurbo/angular-async-error
@JoostK
Spent 3 hours trying to recreate the issue… the best I can do is give you some things I learned.
Can't bind to 'ngIf' since it isn't a known property of 'ng-container'.
instead.No, Ivy fixes are only committed to master (i.e.
@next
) while it’s in preview. There’s no production value in backporting to 8.x.will it be backported to 8.x.x?
i am getting the same issue is there any solution to resolve this production build issue. Thanks in advance.
Build fail for me also with Ivy enabled 😔
The pipe 'json' could not be found (" ... "): ...
Someday i’ll get to see this baby in action…Same problem, solved with orientation of @tiagoboeing