zoover / react-fluxible-i18n

Simple i18n translation and localization components and helpers for React+Fluxible applications.
ISC License
14 stars 1 forks source link

cannot resolve moment-with-locales #1

Closed jamesjjk closed 8 years ago

jamesjjk commented 8 years ago

Hi there,

getting the follow error, missing a package?

./~/moment/min/moment-with-locales.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./locale in /node_modules/moment/min
resolve file
resolve directory /node_modules/moment/min/locale doesn't exist
 @ ./~/moment/min/moment-with-locales.js 346:16-43"
jamesjjk commented 8 years ago

Or maybe moment is missing a package?

gerbenmeyer commented 8 years ago

Thanks for noticing, something was indeed wrong with the way moment was imported, this should be fixed in the latest version of the package, version 0.3.6. Please let me know in case you still have issues.

jamesjjk commented 8 years ago

hey issue still exists did you import the package and the correct class and generate a build

WARNING in ./~/moment/min/moment-with-locales.min.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./locale in /path/node_modules/moment/min
 @ ./~/moment/min/moment-with-locales.min.js 1:3531-3553
gerbenmeyer commented 8 years ago

Can you maybe share which locale you are using, and what you're trying to localize?

jamesjjk commented 8 years ago

Hi @gerbenmeyer I'm simply importing the translater in an isomorphic app. I think with the commit you did you may have not created the build? As I can see the update you did but it still cannot find the module. Is that possible? I'm not localising a date time yet but I would like to.. I do use the number formatter but that works as its native..

jamesjjk commented 8 years ago

@gerbenmeyer updated by importing moment without the min path, it is not compatible with webpack client side. https://github.com/jamesjjk/react-fluxible-i18n

gerbenmeyer commented 8 years ago

Ah, thanks, I'll update the package like that. We're not using webpack, so probably that's why we didn't find out.