dodo / node-unicodetable

unicode lookup table
MIT License
42 stars 34 forks source link

unicode install error #6

Closed s2zaman closed 10 years ago

s2zaman commented 11 years ago

I get the following error on npm install unicode I came across with this while installing docpad-plugin-minicms and it is a dependency there.

npm http GET http://registry.npmjs.org/unicode
npm http 304 http://registry.npmjs.org/unicode

> unicode@0.4.4 postinstall d:\docmini\node_modules\unicode
> node install.js

try to read file /usr/share/unicode/UnicodeData.txt …
Warning: using slow naiv Buffer.indexOf function!
`npm install buffertools` to speed things up.
/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 download …
GET unicode.org:80/Public/UNIDATA/UnicodeData.txt

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ETIMEDOUT
    at errnoException (net.js:901:11)
    at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! weird error 8
npm ERR! not ok code 0
dodo commented 11 years ago

which nodejs version do you use? can you download the txt file manually? On 8 Oct 2013 08:11, "Shah Zaman" notifications@github.com wrote:

I get the following error on npm install unicode I came across with this while installing docpad-plugin-minicms and it is a dependency there.

npm http GET http://registry.npmjs.org/unicode npm http 304 http://registry.npmjs.org/unicode

unicode@0.4.4 postinstall d:\docmini\node_modules\unicode node install.js

try to read file /usr/share/unicode/UnicodeData.txt … Warning: using slow naiv Buffer.indexOf function! npm install buffertools to speed things up. /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 download … GET unicode.org:80/Public/UNIDATA/UnicodeData.txt

events.js:72 throw er; // Unhandled 'error' event ^ Error: connect ETIMEDOUT at errnoException (net.js:901:11) at Object.afterConnect as oncomplete npm ERR! weird error 8 npm ERR! not ok code 0

— Reply to this email directly or view it on GitHubhttps://github.com/dodo/node-unicodetable/issues/6 .

s2zaman commented 11 years ago

node version: v0.10.20 NPM version: 1.3.11

I have downloaded the txt manually. I searched the README.md but couldn't configure where to set the path for it. I also placed this file in the root directory of node-unicodetable and tried npm install but the error remains the same.

s2zaman commented 11 years ago

Thanks !! The problem is solved. I worked out on my system and found out the following solution!!

The problem was mainly related with the docpad-plugin-minicms. So I posted the solution here.

dodo commented 11 years ago

workaround != solved

Works fine for me with that node version. Looks like http.get behaves a little bit different under windows.

Anyway i made your workaround a little bit easier to install (or at least i hope i did).

radum commented 10 years ago

@s2zaman are you behind a corporate proxy or any other form of proxy server? It might be that, I've added a pull request #15 that I think fixes this issues on all platforms.

jmcorpdev commented 9 years ago

I had the same error and unicode is the only module that failed with our corporate proxy, I have tests the code of install.js and I have resolved the problem by replacing this code :

unicodedatafile = {
    host: "unicode.org",

By this code :

unicodedatafile = {
    host: "http://unicode.org",
ihr commented 8 years ago

I'm running CentOS 7 and fixed the issue by doing the following:

  1. sudo yum install unicode-ucd
  2. sudo ln -s /usr/share/unicode/ucd/UnicodeData.txt /usr/share/unicode/UnicodeData.txt
  3. rm -rf node_modules/slug/ node_modules/unicode/
  4. npm install slug
lutaoact commented 8 years ago

this worked for me!

download UnicodeData.txt by yourself, and then put it in the directory which is the same with install.js then run node install.js again.