got some error
Closed this issue · 2 comments
JustAzul commented
Nevermind, just missed the the readme :c
talmobi commented
Halåj!
This is probably because you don't have `tor` running.
You can see the README for installing help, it should be pretty easy - some
like `brew install tor && tor` on OSX or `apt-get install tor` on unix.
BR
Christian
…On Tue, Apr 3, 2018 at 10:36 AM, Azul ***@***.***> wrote:
Code: ```
var tr = require('tor-request');
tr.request('https://api.ipify.org', function (err, res, body) {
if (!err && res.statusCode == 200) {
console.log("Your public (through Tor) IP is: " + body);
}
});
Error:
> ***@***.***\socks-proxy-agent\index.js:94
> var socket = result.socket
> ^
>
> TypeError: Cannot read property 'socket' of undefined
> at onhostconnect ***@***.***\socks-proxy-agent\index.js:94:25)
> at SocksClient.client.once (c:\Users\diego\Desktop\s\node_modules\socks\build\client\socksclient.js:56:21)
> at Object.onceWrapper (events.js:315:30)
> at emitOne (events.js:116:13)
> at SocksClient.emit (events.js:211:7)
> at SocksClient._closeSocket (c:\Users\diego\Desktop\s\node_modules\socks\build\client\socksclient.js:357:18)
> at SocksClient.onError (c:\Users\diego\Desktop\s\node_modules\socks\build\client\socksclient.js:328:14)
> at Socket._onError (c:\Users\diego\Desktop\s\node_modules\socks\build\client\socksclient.js:202:39)
> at Object.onceWrapper (events.js:315:30)
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#20>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABZJh75YJa6CufAAyv75O1LwujgchTaSks5tkyaLgaJpZM4TElzi>
.
talmobi commented
I added some better error messages to the newest versions, since this was quite a common issue.