core
core copied to clipboard
Error: The pipe 'translate' could not be found!
Hi! First of all, thanks for the ngx-translate project! It helped me a lot!! :-)
From my update to Angular 10, I get that error every 2-3 changes:
Error: The pipe 'translate' could not be found!
The solution is to cancel the server and start it again. It takes 2 minutes every time. Do you know what can be the problem?
Thanks,
Rafa
I have the same problem, it is probably something wrong with angular hot reload, since restarting angular fixes it. It only happens on one of my computers, and with other pipes too. I'm not sure what causes it but i suspect it might be a certain node version.
Hi, I'm getting the same errormessage as mentioned above.
I made a stackblitz demontstrating my issue. The translate
pipe works in my root
module, but not in a feature
module which imports SharedModule
. TranslateModule is exported in SharedModule
Restarting doesn't help in my case, I always get the error message. My editor (webstorm) states that the translate pipe IS available when importing SharedModule in FeatureModule.
@thomastvedt your problem is that FeatureModule is not imported in AppModule, it is interesting why it works if there is no translate pipe in PersonComponent. It is probably some weirdness of ivy.
@thomastvedt your problem is that FeatureModule is not imported in AppModule, it is interesting why it works if there is no translate pipe in PersonComponent. It is probably some weirdness of ivy.
Thank you @GotBinGo ! 🙈 😄
This might happen because of missing dependency injection for ngx-translate service.
import { TranslateService } from "@ngx-translate/core";
private translate: TranslateService
add into your constructor() method on all the components where you are using translate pipe
It's working fine for me