Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'unicode/category/So' #58

Open
ralyodio opened this issue Dec 30, 2015 · 17 comments
Open

Cannot find module 'unicode/category/So' #58

ralyodio opened this issue Dec 30, 2015 · 17 comments

Comments

@ralyodio
Copy link

Cannot find module 'unicode/category/So'

it craps out on the const slug = require('slug') statement. it works fine on mac. but debian and ubuntu both throw this error

heres the full error:

module.js:328
    throw err;
    ^

Error: Cannot find module 'unicode/category/So'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at symbols (/home/username/lib/node_modules/slug/slug.js:6:16)
    at /home/username/lib/node_modules/slug/slug.js:199:5
    at Object.<anonymous> (/home/username/lib/node_modules/slug/slug.js:212:2)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/username/lib/config/mylib.js:4:12)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
@ralyodio ralyodio changed the title i get following error on ubuntu when using slug Cannot find module 'unicode/category/So' Dec 30, 2015
@kenotron
Copy link

kenotron commented Jan 2, 2016

Hmmm, I get this on my Mac as well.

@ralyodio
Copy link
Author

ralyodio commented Jan 2, 2016

I just did npm install unicode and that fixed the problem. I think something along the line is missing that as a dependency.

@parmentf
Copy link

parmentf commented Mar 3, 2016

After npm install unicode, the problem is still here (Ubuntu 14.04, node 4.2.2, npm 2.14.7). It's unicode@0.6.1.

ll node_modules/unicode/category/
total 28
drwxr-xr-x 2 parmentf utilisa. du domaine 4096 mars   3 17:27 ./
drwxr-xr-x 4 parmentf utilisa. du domaine 4096 mars   3 17:27 ../
-rw-r--r-- 1 parmentf utilisa. du domaine  210 mars   3 17:27  font-family: Tahoma, Roya, sans-serif.js
-rw-r--r-- 1 parmentf utilisa. du domaine   89 nov.  19  2013 README
-rw-r--r-- 1 parmentf utilisa. du domaine 8242 mars   3 17:27 undefined.js

@haishanh
Copy link

I meet the same problem on Cent OS 7 / node 5.6.0 / npm 3.6.0

npm install unicode not work for me.

@rvanzon
Copy link

rvanzon commented Mar 24, 2016

@haishanh run it in node_modules/slug. It's dirty, but it does the trick.

@htor
Copy link

htor commented Apr 15, 2016

I'm getting this error too, on my Debian 8.2 box. Didn't get it when running locally on my Mac.
Using node v5.10.1 and npm 3.8.3.

Used npm install unicode as a workaround.

@simison
Copy link

simison commented Apr 15, 2016

Could this have something to do with this:

# debian
sudo apt-get install unicode-data # optional
# gentoo
sudo emerge unicode-data # optional

npm install unicode

If you have problems installing UnicodeData.txt because unicode.org is down or you're behind a proxy, try installing unicode-data via your system package installer.

https://www.npmjs.com/package/unicode#install

@1yx
Copy link

1yx commented Aug 23, 2016

@parmentf
try download UnicodeData.txt somewhere else.
cd /tmp && wget http://unicode.org/Public/UNIDATA/UnicodeData.txt
export NODE_UNICODETABLE_UNICODEDATA_TXT=/tmp/UnicodeData.txt
then
npm install unicode gonna work well.
image

@nalbion
Copy link

nalbion commented Aug 26, 2016

There is a pending PR which will resolve this - dodo/node-unicodetable#22

@rajendrakhabiyagate6
Copy link

If you are facing this issue and you are behind windows please follow below steps, i hope worked for you :

  1. Remove the unicode module using npm, npm remove unicode
  2. Downloaded the file from
    http://unicode.org/Public/UNIDATA/UnicodeData.txt and placed it into
    C:\usr\share\unicode-data\ if your project is in C drive, or if you are using
    linux place it in /usr/share/unicode or /usr/share/unicode-data
  3. Installed unicode again

@antoinedejonckheere
Copy link

I'm still facing this issue while deploying my app to heroku. None of the above proposed quick fixes is working ... Any idea?

@dylanjha
Copy link

dylanjha commented Dec 20, 2016

Running into this on circleci, I assume because circle installs from behind a proxy: https://discuss.circleci.com/t/node-cannot-find-module-unicode-category-so/8990

I tried the options from the install section https://github.com/dodo/node-unicodetable#install:

  • (installed unicdoe-data successfully but didn't resolve the issue) sudo apt-get install unicode-data
  • (succeeded but didn't resolve the issue) cd /tmp && wget http://unicode.org/Public/UNIDATA/UnicodeData.txt then export NODE_UNICODETABLE_UNICODEDATA_TXT=/tmp/UnicodeData.txt

Hoping this PR lands, which should resolve this issue entirely dodo/node-unicodetable#22

@dylanjha
Copy link

@antoinedejonckheere trying setting the env variable NODE_MODULES_CACHE=false in your Heroku environment, see if that works for you

@antoinedejonckheere
Copy link

@dylanjha amazing, it worked. My interpretation then is that for one deployment, the install was unsuccessful. Next installations were then using the cached version of the package (which was failing), correct?

@dylanjha
Copy link

@antoinedejonckheere I thought that at first too, but I don't think that is it. If you re-enable the cache it will fail again. To be honest, I don't have an explanation, maybe someone else can chime in if they know.

@dylanjha
Copy link

@antoinedejonckheere also, if converting unicode isn't important to you, check out this module, which doesn't rely on unicode (unicode characters get removed instead of converted) https://www.npmjs.com/package/slugs

@antoinedejonckheere
Copy link

@dylanjha thanks, moving to another package was indeed what I decided to do :) thanks again for your kind help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests