jimbuck / pully

A simple CLI and library for downloading high quality YouTube videos!
https://www.npmjs.com/package/pully
MIT License
189 stars 19 forks source link

osx cli issue #9

Closed mafintosh closed 6 years ago

mafintosh commented 8 years ago

after npm install -g pully on osx i get

pully somelink
env: node\r: No such file or directory

when trying to run it (i'm on node 4.3.1).

jimbuck commented 8 years ago

Did you literally run pully somelink? Or did you provide a Youtube URL instead of somelink? I don't have access to a Mac, so I might need some more information.

mafintosh commented 8 years ago

it was a youtube link. i cannot run any pully command without getting that error. to me it looks like a windows line-ending issue

jimbuck commented 8 years ago

Just looking through the code on GitHub, I think the bottom of that stack trace would be here, but I'm not sure what line-ending would be causing it. If you run the tests does it all work?

mafintosh commented 8 years ago

Yep tests all work and the cli works if i call it with node like this

node $(which pully) <somelink>
jimbuck commented 8 years ago

That's very interesting, thank you for looking in to it! Unfortunately that doesn't really give me any other ideas as to why it might be happening. Maybe something wrong with the alias, since the full path (via which) is working fine? In other words, do you think it could be an issue with the package.json bin bindings?

Jinksi commented 8 years ago

Having the same issue. Node v5.11.0 OSX 10.11.4

hparra commented 8 years ago

I've confirmed this issue is due to CRLF endings. Didn't realize Node doesn't like them. Please see https://help.github.com/articles/dealing-with-line-endings/#platform-windows

hparra commented 8 years ago

Sorry, this is probably an npm publish issue from Windows. See https://github.com/npm/npm/issues/2097.

npm install -g JimmyBoh/pully works as expected.

A roundabout fix would be to have TravisCI publish the module for you. See https://docs.travis-ci.com/user/deployment/npm/

Thank you for this tool. HGPA

jimbuck commented 8 years ago

Thanks @hparra and everyone! I will be sure to push a new build out tonight. I've learned a lot more about npm version and such, so I will be making updates to the build chain for easier deployments (that work cross platform as well). I will close this issue out once I publish a fixed build.

alexbinary commented 8 years ago

As of today on OS X npm install -g pully still gives the error env: node\r: No such file or directory but npm install -g JimmyBoh/pully works fine.

$ npm install -g pully
$ pully
env: node\r: No such file or directory
$ npm install -g JimmyBoh/pully
$ pully
(works fine)
jimbuck commented 8 years ago

Oh my goodness, I am so sorry I did not get a chance to work on this yet. Since tomorrow is Memorial Day here in the USA, I will be able to make this fix and push out a new update (I will work on the build-chain more later).

jimbuck commented 8 years ago

Version 1.2.2 is now live! Please download and let me know if the line endings are correct. I will check back periodically and make any fixes necessary.

alexbinary commented 8 years ago

Thanks for the update, Jim. Unfortunately I just did npm install -g pully and still got the error env: node\r: No such file or directory. (npm install -g JimmyBoh/pully still working fine)

jimbuck commented 8 years ago

@alexbinary Damn! I followed the steps here to try and fix all files, but it didn't show me editing any files. Anybody know of a way to find the problem file, or force-fix all of them?

jimbuck commented 8 years ago

Has anybody been able to fix an issue like this before? I'm thinking that maybe if I make Travis CI deploy it then it should work fine. But I need to start installing ruby etc to encrypt my NPM creds. I will post here when that is done.

jimbuck commented 8 years ago

I just published a new build, trying to force all line endings to be LF instead of CRLF.

the-office-praying-fingers-crossed-hT6bzjJnhtya4

alexbinary commented 8 years ago

Yes ! Just did npm install -g pully and it worked ! Nice job Jim 👍

mafintosh commented 8 years ago

also works for me now! thanks a lot.

jimbuck commented 8 years ago

Phew, thanks for the help everyone! I deeply apologize for taking this long to resolve it!

mafintosh commented 8 years ago

@JimmyBoh no need to apologise. we should be thanking you for writing the module!

movprojects commented 7 years ago

this issue is back again

rutgerrrrr commented 7 years ago

The issue is still there... Running npm install -g JimmyBoh/pully results in an error: ENOENT: no such file or directory, chmod '/Users/Me/.npm-packages/lib/node_modules/pully/dist/bin/pully.js'

rutgerrrrr commented 7 years ago

Ok, so after some google searches I tried this and it seems to work for me:

jimbuck commented 7 years ago

Aah, a line ending issue? I thought I got rid of these. I'll try to fix it.

PacoH commented 6 years ago

@adaringdesign

Brilliant. I just installed pully 2.1.4 and the problem still exists more than 6 months later. dos2unix didn't work on the symlink /usr/local/bin/pully -> ../lib/node_modules/pully/dist/bin/pully.js, so I got the absolute path using:

$ greadlink -f `which pully`
/usr/local/lib/node_modules/pully/dist/bin/pully.js

and ran dos2unix on it and now pully works perfectly. But I think it should be updated so people don't have to go through this. I spent hours spinning my wheels until I found this solution.

jimbuck commented 6 years ago

Sorry @PacoH, I wish this paid the bills so I could spend time on it.

I will try to get a new version out there in the next day or so. I will write here when it is ready for your (and others) to test.

PacoH commented 6 years ago

All you have to do is run dos2unix on pully.js to remove the \rs. Then you could change the settings of your editor to use UNIX linefeeds only, in the future. I think Windows/DOS can still read just \ns, if I'm not mistaken.

jimbuck commented 6 years ago

A new update is available. Please give it a shot and let me know what you find. I have also enabled logging via debug, so please to enable it for the namespace 'pully*' if you run into any issues.

PacoH commented 6 years ago

OK, Jimmy. Thanks for the update. It works without any modification. The download speed is slower than youtube-dl, which I am looking to replace because it is so slow now. I was hoping that pulley, written in javascript, would be as fast as ytdl. Here is a comparison among youtube-dl, pully, and ytdl.

$ time(`youtube-dl` https://www.youtube.com/watch?v=P9DYUUyKExI)
[download] 100% of 15.55MiB in 02:30
[download] 100% of 5.35MiB in 01:35
…

size: 21.7MB

real    4m16.370s
user    0m4.336s
sys 0m0.933s

$ pully -V
2.1.6
$ time(`pully` dl https://www.youtube.com/watch?v=P9DYUUyKExI)

size: 16.9MB

real    4m4.844s
user    6m27.883s
sys 0m7.774s

$ time(`ytdl` https://www.youtube.com/watch?v=P9DYUUyKExI)
…
[##################################################] 100%

size: 18.1MB (18974777 bytes)

real    0m2.398s
user    0m0.820s
sys 0m0.262s
jimbuck commented 6 years ago

If I could please get a few more people to test I will close this issue down.

@PacoH If you would like to create a separate issue as a place to discuss download speeds then please feel free to do so and I will be happy to answer any questions.

PacoH commented 6 years ago

OK I will.

jimbuck commented 6 years ago

Closing since I haven't heard anything else.