openone / litero

Literotica Story downloader
Apache License 2.0
9 stars 7 forks source link

Script doesn't seem to work on Ubuntu 14.04 #1

Open CoderFromCali opened 8 years ago

CoderFromCali commented 8 years ago

I tried to run your script on Ubuntu 14.04 (64-bit) and got the following:

:~$ litero_getstory -u https://www.literotica.com/s/surfacing-ch-01
/usr/bin/env: node: No such file or directory

There is an issue with nodejs on Ubuntu where node shares the same package name as something else. To try and fix this I edited this line in _/usr/local/lib/nodemodules/litero/index.js

Changed

#!/usr/bin/env node

to

#!/usr/bin/env nodejs

When I ran the script again it failed with the following:

:~$ litero_getstory -u https://www.literotica.com/s/surfacing-ch-01

/usr/local/lib/node_modules/litero/lib/litero.js:52
    exposed.story = Object.assign({}, inner.story);
                           ^
TypeError: Object function Object() { [native code] } has no method 'assign'
    at /usr/local/lib/node_modules/litero/lib/litero.js:52:28
    at Object.<anonymous> (/usr/local/lib/node_modules/litero/lib/litero.js:323:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/litero/index.js:3:14)
    at Module._compile (module.js:456:26)
openone commented 8 years ago

Hello @CoderFromCali , May i know the nodejs version (nodejs --version)?

And it seems node executable is named node in OS X and nodejs in Linux.

CoderFromCali commented 8 years ago
:~$ nodejs --version
v0.10.25
:~$ uname -a
Linux <hostname> 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
CaesiumSalad commented 6 years ago

It seems as though you have an older version of nodejs. I have v4.7.2 and it works I'm in 14.04 as well.

CaesiumSalad commented 6 years ago

Oops just realised old thread my bad