rxaviers / globalize-webpack-plugin

Globalize.js webpack plugin
Other
33 stars 27 forks source link

Cannot build: Getting a lot of "Cannot resolve module 'cldr...'" errors #56

Open zachschultz opened 7 years ago

zachschultz commented 7 years ago

I am trying to build using Webpack and this plugin with config as follows:

new GlobalizePlugin({
  production: process.env.NODE_ENV === 'production',
  developmentLocale: 'es',
  supportedLocales: [ 'en', 'de', 'es' ],
  output: 'i18n/[locale].[hash].js'
}),

and in my code all I'm doing is var Globalize = require('globalize');

During the build process I get a huge amount of errors, like:

resolve 'file' cldr in /Users/zach/dev/entry-point/code/node_modules
  resolve file
    /Users/zach/dev/entry-point/code/node_modules/cldr doesn't exist
    /Users/zach/dev/entry-point/code/node_modules/cldr.webpack.js doesn't exist
    /Users/zach/dev/entry-point/code/node_modules/cldr.web.js doesn't exist
    /Users/zach/dev/entry-point/code/node_modules/cldr.js doesn't exist
    /Users/zach/dev/entry-point/code/node_modules/cldr.json doesn't exist

Looking at the Globalize repo issues, it seems like this plugin was created to fix the issues I'm having, but for some reason it's not working for me.

rxaviers commented 7 years ago

Please, can you run this example locally? If so, how different is this from what you're using? Which webpack version are you using?

jan0991 commented 7 years ago

Same problem with webpack 2.4.1.

ni3galave commented 7 years ago

I am also getting similar issue even after trying this example with webpack version : 2.6.1

Can't resolve 'cldr/supplemental'

teddy-dubal commented 5 years ago

Hi , An anwser for this 'Can't resolve 'cldr/supplemental'' ??

FrederickRies commented 5 years ago

Try to add : "cldr-data": ">=25" as a dependency in your package.json file