joanllenas / ngx-date-fns

⏳ date-fns pipes for Angular
165 stars 14 forks source link

Error is is not a Module when adding locales #257

Closed JesusCN closed 5 years ago

JesusCN commented 5 years ago

Hi,

I followed the instructions to Changing locale globally.

The next error appears:

ERROR in src/app/app.module.ts(43,27): error TS2306: File '.../node_modules/date-fns/locale/es/index.d.ts' is not a module.

I can serve the app and is working but the error is very anoying.

What can i do ?¿

Thanks in advance.

joanllenas commented 5 years ago

Hi @JesusCN , I'll take a look ASAP.

Meanwhile, you can try downgrading date-fns to v1.29. That's the version this library has been developed/tested with and shouldn't be problematic. I'm not sure what changed from 1.29 to 1.30 but there are no API changes. It should be safe.

Cheers

JesusCN commented 5 years ago

Hi @joanllenas,

Thanks for the quick reply !! I can confirm you that the error didnt show up with v1.29 of date-fns.

Thanks again.

Cheers