rxaviers / cldr-data-npm

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

downloader's isInstalled check fails (npm 3) #31

Open marcelklehr opened 8 years ago

marcelklehr commented 8 years ago

Even if the latest version is already installed, when I install something else cldr-data's install script is re-run, all the previously downloaded files are gone and consequently cldr-data-downloader downloads everything again.

I'm not sure why all the files are being deleted. I suspect it's npm cleaning up or something :/

rxaviers commented 8 years ago

This repo uses https://github.com/rxaviers/cldr-data-downloader to do the download (specific code).

Debug info is highly appreciated and I can help you with any specifics...

marcelklehr commented 8 years ago

Yep, State#isInstalled always returns false, because the downloaded files are gone. I checked with fs.readdir.

rxaviers commented 8 years ago

Oh, I see. Does this help https://docs.npmjs.com/cli/install#algorithm?

It smells like we should definitely implement #28.

marcelklehr commented 8 years ago

I've filed an npm issue over here: https://github.com/npm/npm/issues/11971

marcelklehr commented 8 years ago

I'm not sure #28 would be the right solution, as it completely undermines node's module system requiring a global install. That would make cldr-data even harder to install.