Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osx cli issue #9

Closed
mafintosh opened this issue Mar 19, 2016 · 32 comments
Closed

osx cli issue #9

mafintosh opened this issue Mar 19, 2016 · 32 comments
Assignees

Comments

@mafintosh
Copy link

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
Copy link
Owner

jimbuck commented Mar 21, 2016

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
Copy link
Author

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
Copy link
Owner

jimbuck commented Mar 21, 2016

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
Copy link
Author

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

node $(which pully) <somelink>

@jimbuck
Copy link
Owner

jimbuck commented Mar 21, 2016

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
Copy link

Jinksi commented Apr 26, 2016

Having the same issue.
Node v5.11.0
OSX 10.11.4

@hparra
Copy link

hparra commented May 1, 2016

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
Copy link

hparra commented May 1, 2016

Sorry, this is probably an npm publish issue from Windows. See npm/npm#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
Copy link
Owner

jimbuck commented May 2, 2016

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
Copy link

alexbinary commented May 29, 2016

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
Copy link
Owner

jimbuck commented May 29, 2016

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
Copy link
Owner

jimbuck commented May 30, 2016

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
Copy link

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
Copy link
Owner

jimbuck commented May 31, 2016

@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 jimbuck added the bug label Jun 1, 2016
@jimbuck jimbuck self-assigned this Jun 1, 2016
@jimbuck
Copy link
Owner

jimbuck commented Jun 13, 2016

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
Copy link
Owner

jimbuck commented Jun 13, 2016

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
Copy link

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

@mafintosh
Copy link
Author

also works for me now! thanks a lot.

@jimbuck
Copy link
Owner

jimbuck commented Jun 13, 2016

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

@mafintosh
Copy link
Author

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

@movprojects
Copy link

this issue is back again

@rutgerrrrr
Copy link

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
Copy link

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

  • brew install dos2unix
  • dos2unix /Users/Me/.npm-packages/lib/node_modules/pully/dist/bin/pully.js

@jimbuck
Copy link
Owner

jimbuck commented May 2, 2017

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

@jimbuck jimbuck reopened this May 2, 2017
@PacoH
Copy link

PacoH commented Jan 31, 2018

@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
Copy link
Owner

jimbuck commented Jan 31, 2018

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
Copy link

PacoH commented Jan 31, 2018

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
Copy link
Owner

jimbuck commented Jan 31, 2018

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
Copy link

PacoH commented Jan 31, 2018

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
Copy link
Owner

jimbuck commented Jan 31, 2018

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
Copy link

PacoH commented Feb 1, 2018

OK I will.

@jimbuck
Copy link
Owner

jimbuck commented Feb 3, 2018

Closing since I haven't heard anything else.

@jimbuck jimbuck closed this as completed Feb 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants