Closed bookercodes closed 8 years ago
I keep getting an error env: node\r: No such file or directory
when I run the cli.
Steps:
env: node\r: No such file or directory
Any thoughts?
@stoked It's funny :laughing: -- I stumbled upon your profile the other day and thought "This person's going to need github-unfollow-everyhone
one day" and here you are!
As for your error, could you please try this solution and let me know how it goes?
I'm not sure if this is a problem with your Node installation or my code. I suspect the former.
haha! It was inevitable our paths would cross lol.
You're probably correct, I'll try that solution this evening and let you know how it goes. Thank you for responding with help! : )
I do believe that this is a problem with my node installation, as I installed via Homebrew so it sends it to usr/local/bin not usr/bin. Unfortunately, the new OS X El Capitian does not allow users (even with sudo) to edit or symlink to usr/bin... We seem to be out of luck on this one.
Any suggestions on how I could possibly make this script work? Or should I just let the node universe have this win and retire the hope of a clean github haha.
I highly recommend nvm! I used to have trouble installing Node all the time before I started using it. Let me know how you get on.
Strange, I'm not sure what's going on now haha. I uninstalled node, and re-installed via NVM but still get the same error: env: node\r: No such file or directory
After a bit of research I found others got the same error because of new lines being handled differently in a unix platform. Not sure if that helps at all. Additionally, I am on the latest Mac OS X.
Here is an example of what seems to be the problem for most people - https://github.com/colorhook/node-smushit/issues/4
@stoked You know what, now I think about it, I wrote this module on Windows! I'll convert the line-endings and push an update this evening. You can then test it. Sound good?
Perfect!
@stoked I think I fixed it.
Please update your module (npm install -g github-unfollow-everyone
) and try again.
Success! Well, mostly. It works brilliantly with an account with just a handful of people followed. The larger ones (needing to unfollow thousands) is presumably loading or working through it. I will leave it running for a while, and see how long it takes, if it ever does, to unfollow huge numbers like mine : )
I'll let you know how it does. Thanks so much for the help! And glad we got it at least working on smaller accounts on my machine!
@stoked I would be surprised if it worked on your account. 30,000 followers is a lot. I don't imagine it'd take long for GitHub to throttle the requests.
Let me know how it goes.
haha yeah 30K may take a while. It seems to take ~10-ish min to unfollow 500 users. At the end of running this message appears - Which I assume is github telling me to piss off for a bit haha.
oops. an error occured: { [Error: getaddrinfo ENOTFOUND api.github.com api.github.com:443] defaultMessage: 'Internal Server Error', message: 'getaddrinfo ENOTFOUND api.github.com api.github.com:443', code: '500' }
It may take a while, but it definitely gets the job done! Thanks again! (and like I said before, it is lightning fast unfollowing a handful of users)
Here are some ideas for improvements:
error
argument will contain information about the specific error that caused the operation to fail.result
argumentresult
argument is not useful. It would be good if it contained information about the operation such as how many users were unfollowed.If you desire any of these let me know, and I will work on them :smile:.