AndrewPoyntz / time-ago-pipe

An Angular pipe for converting a date string into a time ago
MIT License
130 stars 67 forks source link

"badly packaged library" #15

Closed dfederm closed 6 years ago

dfederm commented 6 years ago

I'm seeing this error when doing AOT compilation:

ERROR in ./node_modules/time-ago-pipe/index.ts
Module build failed: Error: C:\Users\David\Code\...\node_modules\time-ago-pipe\index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).

According to the error, it seems like the problem is that there's no JS in the package, so it's actually trying to compile the package as well when compiling my code, which shouldn't be done.

According to Google, the "right" way to package an Angular module is described here: https://goo.gl/jB3GVv