node-slug
node-slug copied to clipboard
Cannot find module 'unicode/category/So'
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)
Hmmm, I get this on my Mac as well.
I just did npm install unicode and that fixed the problem. I think something along the line is missing that as a dependency.
After npm install unicode, the problem is still here (Ubuntu 14.04, node 4.2.2, npm 2.14.7). It's [email protected].
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
I meet the same problem on Cent OS 7 / node 5.6.0 / npm 3.6.0
npm install unicode not work for me.
@haishanh run it in node_modules/slug. It's dirty, but it does the trick.
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.
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
@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.

There is a pending PR which will resolve this - https://github.com/dodo/node-unicodetable/pull/22
If you are facing this issue and you are behind windows please follow below steps, i hope worked for you :
- Remove the unicode module using npm, npm remove unicode
- 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
- Installed unicode again
I'm still facing this issue while deploying my app to heroku. None of the above proposed quick fixes is working ... Any idea?
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.txtthenexport NODE_UNICODETABLE_UNICODEDATA_TXT=/tmp/UnicodeData.txt
Hoping this PR lands, which should resolve this issue entirely https://github.com/dodo/node-unicodetable/pull/22
@antoinedejonckheere trying setting the env variable NODE_MODULES_CACHE=false in your Heroku environment, see if that works for you
@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?
@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.
@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
@dylanjha thanks, moving to another package was indeed what I decided to do :) thanks again for your kind help