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

Not working on OSX #94

Closed
marqu3z opened this issue Sep 16, 2014 · 3 comments
Closed

Not working on OSX #94

marqu3z opened this issue Sep 16, 2014 · 3 comments

Comments

@marqu3z
Copy link

@marqu3z marqu3z commented Sep 16, 2014

Installed from npm repo, it does not respond to flag options and throw error if a filepath is provided, even if it does not exixts.

OSX 10.8.5
node v0.10.31

npm install webtorrent -g

# With any flag
webtorrent -v  // show up help message 
webtorrent -anything //show up help message

webtorrent filepath // even if it does not exists

# Error
/usr/local/lib/node_modules/webtorrent/bin/cmd.js:172
    var numPeers = torrent.swarm.numPeers
                                ^
TypeError: Cannot read property 'numPeers' of undefined
    at updateMetadata (/usr/local/lib/node_modules/webtorrent/bin/cmd.js:172:33)
    at WebTorrent.filename (/usr/local/lib/node_modules/webtorrent/bin/cmd.js:164:3)
    at WebTorrent.emit (events.js:95:17)
    at /usr/local/lib/node_modules/webtorrent/index.js:71:10
    at process._tickCallback (node.js:419:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:906:3

@thammin

This comment has been minimized.

Copy link
Contributor

@thammin thammin commented Sep 17, 2014

I think we could add some code to check if the filepath is a valid input or just catch the error instead.

feross added a commit that referenced this issue Sep 17, 2014
@feross feross closed this in eb0321e Sep 17, 2014
feross added a commit that referenced this issue Sep 17, 2014
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Sep 17, 2014

Thanks for reporting – this is fixed in 0.7.2 now.

The -v or --version flags now print the version correctly. I added a test for good measure.
There's also a friendlier error when entering an invalid file path now.

@marqu3z

This comment has been minimized.

Copy link
Author

@marqu3z marqu3z commented Sep 17, 2014

I confirm it is working without errors.
Thank you for the quick fix.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
bricewge pushed a commit to bricewge/webtorrent that referenced this issue May 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.