darrenscerri / duplicate-package-checker-webpack-plugin

🕵️ Webpack plugin that warns you when a build contains multiple versions of the same package
MIT License
709 stars 29 forks source link

Something wrong with date-fns #7

Closed nkt closed 7 years ago

nkt commented 7 years ago

Hello, thanks for this project! I've got following warning on my projects:

WARNING in duplicate-package-checker:
  <undefined>
    undefined ./~/date-fns/parse
    undefined ./~/date-fns/compare_asc
    undefined ./~/date-fns/compare_desc
    undefined ./~/date-fns/difference_in_calendar_months
    undefined ./~/date-fns/difference_in_milliseconds
    undefined ./~/date-fns/difference_in_months
    undefined ./~/date-fns/difference_in_seconds
    undefined ./~/date-fns/distance_in_words
    undefined ./~/date-fns/distance_in_words_to_now
    undefined ./~/date-fns/is_date
    undefined ./~/date-fns/locale/_lib
    undefined ./~/date-fns/locale/en
darrenscerri commented 7 years ago

Can you provide more information on how date-fns is being required?

darrenscerri commented 7 years ago

Is it possible that what's requiring date-fns has a package.json without the name property?

Update: v1.2.1 should handle such cases gracefully

darrenscerri commented 7 years ago

Issue fixed with v1.2.2. Issue was due to non-root package.json files in date-fns.

https://github.com/date-fns/date-fns/issues/264#issuecomment-265128399 https://github.com/jsdnxx/find-root/issues/2

nkt commented 7 years ago

Thanks!