rxaviers / cldr-data-npm

Npm module for Unicode CLDR JSON data
MIT License
42 stars 27 forks source link

Webpack issue with cldr-data latest version #51

Open msreddy09 opened 7 years ago

msreddy09 commented 7 years ago

As I am using react-globalize, it is using cldr-data latest version. With latest version I am getting following error while bundling with webpack.

I dont see cldr-data\supplemental folder in latest version. May I know how to work with latest version. When I am using cldr-data 26.x version, its working as expected.

C:\view\reactapp\node_modules\webpack\bin\webpack.js:323
                throw e;
                ^

Error: ENOENT: no such file or directory, scandir 'C:\view\reactapp\node_modules\cldr-data\supplemental'
    at Error (native)
    at Object.fs.readdirSync (fs.js:952:18)
    at jsonFiles (C:\view\reactapp\node_modules\cldr-data\index.js:36:22)
    at supplementalPaths (C:\view\reactapp\node_modules\cldr-data\index.js:69:27)
    at Function.cldrData.entireSupplemental (C:\view\reactapp\node_modules\cldr-data\index.js:94:29)
    at cldr (C:\view\reactapp\node_modules\globalize-webpack-plugin\util.js:21:21)
    at new DevelopmentModePlugin (C:\view\reactapp\node_modules\globalize-webpack-plugin\DevelopmentModePlugin.js:27:40)
    at GlobalizePlugin.apply (C:\view\reactapp\node_modules\globalize-webpack-plugin\index.js:25:7)
    at Compiler.apply (C:\view\reactapp\node_modules\tapable\lib\Tapable.js:306:16)
    at webpack (C:\view\reactapp\node_modules\webpack\lib\webpack.js:32:19)
    at processOptions (C:\view\reactapp\node_modules\webpack\bin\webpack.js:313:14)
    at Object.<anonymous> (C:\view\reactapp\node_modules\webpack\bin\webpack.js:373:1)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:393:7)
    at startup (bootstrap_node.js:150:9)
    at bootstrap_node.js:508:3
error Command failed with exit code 1.
msreddy09 commented 7 years ago

Could you help me on this. Thanks

rxaviers commented 7 years ago

Please, does this still apply to you? Or was it an intermittent issue?

KlavierCat commented 6 years ago

Ran into this error too with webpack but after running npm install cldr-data manually I was able to bypass this.

sanjayror commented 4 years ago

I'm having the same issue.

image

when npm run build

howlettt commented 3 years ago

Ran into this issue as well, I had to uninstall a npm package that has cldr-data as a peer dependency first and then install cldr-data manually