node-unicodetable icon indicating copy to clipboard operation
node-unicodetable copied to clipboard

overcoming UnicodeTable.txt download

Open mcharytoniuk opened this issue 9 years ago • 8 comments

I am not the package maintainer but I'll leave this info here because it may be useful:

The other way to overcome UnicodeTable.txt download problems under corporate networks, weird proxies, etc is to download everyting manually and distribute "unicode" under "bundledDependencies" in package.json:

{
  "bundledDependencies": [
    "unicode"
  ]
}

Then just place unicode package with downloaded UnicodeTable.txt and generated category dir under your project's node_modules and keep it versioned (actually package.json file and category directory is enough for unicode to work).

I hope it helps someone. I think it can be also mentioned in a README.

mcharytoniuk avatar Jun 24 '15 09:06 mcharytoniuk

try to read file /usr/share/unicode/UnicodeData.txt … /usr/share/unicode/UnicodeData.txt not found. try to read file /usr/share/unicode-data/UnicodeData.txt … /usr/share/unicode-data/UnicodeData.txt not found. try to read file UnicodeData.txt … UnicodeData.txt not found. try to download … GET unicode.org:80/Public/UNIDATA/UnicodeData.txt request timed out.

mac pro os x node install.js not work

ltanme avatar Mar 10 '16 08:03 ltanme

same thing again could you do something with this?

curl -vvv -s -i 'http://unicode.org:80/Public/UNIDATA/UnicodeData.txt'
* About to connect() to unicode.org port 80 (#0)
*   Trying 216.97.88.9... Connection timed out
* couldn't connect to host
* Closing connection #0

tereska avatar Aug 04 '16 09:08 tereska

Why not bundle the file with the lib? This is really annoying..

leinonen avatar Aug 16 '16 06:08 leinonen

update the install.js by replacing this code :

unicodedatafile = { host: "unicode.org",

By this code : unicodedatafile = { host: "http://unicode.org",

mrj04 avatar Aug 29 '16 18:08 mrj04

Finally, how to solve the questions on MacOs?

xusai2014 avatar Feb 15 '17 02:02 xusai2014

I've started hitting this timeout issue a lot on a Travis build:

> [email protected] postinstall /home/travis/build/guyellis/plant/node_modules/unicode
> node install.js
try to read file /usr/share/unicode/UnicodeData.txt …
/usr/share/unicode/UnicodeData.txt not found.
try to read file /usr/share/unicode-data/UnicodeData.txt …
/usr/share/unicode-data/UnicodeData.txt not found.
try to read file UnicodeData.txt …
UnicodeData.txt not found.
try to download …
GET unicode.org:80/Public/UNIDATA/UnicodeData.txt
request timed out.

Any ideas why Travis would be timing out?

guyellis avatar Mar 26 '17 23:03 guyellis

I doubt that it is limited to your Travis environment. When it happens, try getting the file in your web browser. The file is simply not reliably available at that location.

You have two option:

  1. remove the dependency (considering how stale this lib is, I recommend that)
  2. Implement some hack to bypass the flaw

mwj8410 avatar Mar 27 '17 00:03 mwj8410

^ cause above is your host being blacklisted for excess downloads, see #16

srl295 avatar Apr 04 '17 15:04 srl295