GithubHelp home page GithubHelp logo

Unable to run this command about reddid HOT 12 CLOSED

prashcr avatar prashcr commented on July 23, 2024
Unable to run this command

from reddid.

Comments (12)

prashcr avatar prashcr commented on July 23, 2024

Which node version are you on? Could you show me the output of

node --version

from reddid.

mberg2007 avatar mberg2007 commented on July 23, 2024

Yes:

$ node --version
v4.2.6
$

Also I'm running Ubuntu, pretty standard setup:

$ uname -a
Linux michael-laptop 4.4.0-64-generic #85-Ubuntu SMP Mon Feb 20 11:50:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

from reddid.

prashcr avatar prashcr commented on July 23, 2024

Thanks, I'll spin up an Ubuntu vm and see if I can reproduce

from reddid.

mberg2007 avatar mberg2007 commented on July 23, 2024

Did you have any luck reproducing this problem?

from reddid.

prashcr avatar prashcr commented on July 23, 2024

Incredibly sorry for the late reply. I tried it and was able to reproduce the problem. It seems Linux does not support arguments in a shebang, TIL.

SpencerCDixon/redux-cli#42

The reason I used node --harmony was that back when I wrote it I was using arrow functions that weren't part of the latest stable node version, so I had to pass the --harmony flag to enable experimental features such as arrow functions.

Now we're well past that and I don't see the need for --harmony anymore so I removed it and pushed a new version, it should work now.

from reddid.

mberg2007 avatar mberg2007 commented on July 23, 2024

Hi, thanks for your answer. How do I update my installed version?

I tried doing the npm install again but it hasn't resolved the problem. Same issue as before with the "--harmony" no such file message.

from reddid.

prashcr avatar prashcr commented on July 23, 2024

Try npm update -g reddid

from reddid.

prashcr avatar prashcr commented on July 23, 2024

My bad, it seems I didn't push the update to npm. I just did that, let me know if it works. Either npm install or update should work.

from reddid.

mberg2007 avatar mberg2007 commented on July 23, 2024

I'm sorry to bother you again with this issue but there seems to be another problem now:

michael@michael-laptop:~$ sudo npm update -g reddid
/usr/local/bin/reddid -> /usr/local/lib/node_modules/reddid/cli.js
/usr/local/lib
└── [email protected] 

michael@michael-laptop:~$ cd temp/reddid/
michael@michael-laptop:~/temp/reddid$ reddid earthporn hot 3
/usr/local/lib/node_modules/reddid/cli.js:19
let [sub, cat, num, time] = cli.input
    ^

SyntaxError: Unexpected token [
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

from reddid.

mberg2007 avatar mberg2007 commented on July 23, 2024

And just FYI: "earthporn" isn't some bizarre fetish, it's images from beautiful locations around the world :-) Some of those photos are amazingly beautiful, I hope to use reddid to collect a few to use for my screensaver.

from reddid.

prashcr avatar prashcr commented on July 23, 2024

I'm an avid redditor myself, no worries πŸ˜„
I think that means your version of node.js is too old. It should work on anything v6+

from reddid.

mberg2007 avatar mberg2007 commented on July 23, 2024

That solved it. Took a bit of research to find out how to do that with Ubuntu but I'm now running version 7.x of nodejs and reddid is working like a charm now. The first 50 images are already on my drive :-)

Thanks for your help!

from reddid.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.