-
Notifications
You must be signed in to change notification settings - Fork 154
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
Pipe could not be found with Angular 9 (Ivy enabled by default) #232
Comments
I've modified the ngcc-validation project locally, just in case as I saw that ngx-moment is part of it already, but the project did not contain any usage of the library. I've added the module import, an example in the template and a test and could indeed reproduce the issue there. Here are the changes that I've made: dsebastien/ngcc-validation@96fa000 (note that the test might be incorrect as I didn't go any further) :) |
I wonder whether building the library with Angular 9.1.0 will do the trick |
Mh, don't know if I did it correctly, but it didn't work. I have:
The test failed with the same error about the pipe not being found. I found the following issues which all seem old/closed already but can't make sense of them: |
What you did sounds correct (though, next time, you can use Can you please create a small project that reproduces the issue and share it on github? This will make it easier for me to look for a solution |
Gaaaahhh my bad! I was trying to understand why it was working with a fresh Angular CLI project. The fact is that in my project I'm using Storybook and forgot to add the module import in the story's test module (oh my...). And it was the same stupid mistake I did in ngcc-validation. I added the import in app.module.ts, but not in the TestBed dummy module... Anyways, sorry for the waste of time ❌ |
Thank you for documenting your findings. I'm sure this will save time to some other folks in the future :) |
Let's hope so.. haha ;-) |
Description of the Issue and Steps to Reproduce:
Create an Angular 9+ project and add ngx-moment to it.
Use any of the pipes and get the error, such as:
The pipe 'amDuration' could not be found
Did you search for duplicate issue? [Yes]
Please describe the issue and steps to reproduce, preferably with a code sample / plunker:
It seems that the pipes can't be found with Ivy enabled in the project. Not sure how to fix this as I'm not willing to disable Ivy
Ensure your issue is isolated to ngx-moment. Issues involving third party tools will be closed unless submitted by the tool's author/maintainer.
Environment:
Please answer the following questions:
moment
version? 2.24.0moment-timezone
? YesThe text was updated successfully, but these errors were encountered: