Coder Social home page Coder Social logo

Comments (7)

dsebastien avatar dsebastien commented on August 18, 2024

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) :)

from ngx-moment.

urish avatar urish commented on August 18, 2024

I wonder whether building the library with Angular 9.1.0 will do the trick

from ngx-moment.

dsebastien avatar dsebastien commented on August 18, 2024

Mh, don't know if I did it correctly, but it didn't work.

I have:

  • updated dependencies of Angular to 9.1.0
  • ran npm run prepublish to generate the package in dist
  • removed ngx-moment in the node_modules folder of my locally installed ngcc-validation project
  • copied over the contents of the dist folder in ngcc-validation/node_modules
  • ran npx ngcc against from ngcc-validation
  • executed the test again

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:

from ngx-moment.

urish avatar urish commented on August 18, 2024

What you did sounds correct (though, next time, you can use npm link instead of having to copy the files manually).

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

from ngx-moment.

dsebastien avatar dsebastien commented on August 18, 2024

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 ❌

from ngx-moment.

urish avatar urish commented on August 18, 2024

Thank you for documenting your findings. I'm sure this will save time to some other folks in the future :)

from ngx-moment.

dsebastien avatar dsebastien commented on August 18, 2024

Let's hope so.. haha ;-)

from ngx-moment.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.