mscdex / socksv5

SOCKS protocol version 5 server and client implementations for node.js
MIT License
401 stars 120 forks source link

Missing dependency ipv6? #4

Closed bwin closed 9 years ago

bwin commented 9 years ago

Me again. atom-shell#1247 cont'd I see ipv6 is included in git, but if you do npm install socksv5 it's missing. AFAIK node_modules is npm-ignored by default.

bwin commented 9 years ago
λ ~/test-socksv5$ npm i socksv5
npm WARN package.json test-socksv5@0.0.0 No description
npm WARN package.json test-socksv5@0.0.0 No repository field.
npm WARN package.json test-socksv5@0.0.0 No README data
npm http GET https://registry.npmjs.org/socksv5
npm http 304 https://registry.npmjs.org/socksv5
socksv5@0.0.4 node_modules/socksv5
λ ~/test-socksv5$ ls node_modules/socksv5/
index.js  lib  LICENSE  package.json  README.md  test
λ ~/test-socksv5$ 
mattcollier commented 9 years ago

@bwin, I believe ipv6 is properly installed if one uses npm, the problem arises when one specifies the git repository for socksv5 as a dependency.

I'm using npm v2.7.0 that comes with io.js.

bwin commented 9 years ago

I believe ipv6 is properly installed if one uses npm

For me it's not. See my cli output from one comment earlier. Or am I missing something here?

mscdex commented 9 years ago

If you download the tarball directly from npm, you will see the node_modules/ipv6 is contained within it. Something else must be removing afterwards?

mscdex commented 9 years ago

Similarly, if the repo is cloned, you should get the same directory structure.

bwin commented 9 years ago

Ok, I tested in a vm with an old node@0.10.25 and npm@1.3.10. On my node@0.12.0 with npm@2.5.1 it is included. So maybe the old npm ignores it? If nobody else has any problems close this, as I'm not an user and it's just an old vm setup.

mattcollier commented 9 years ago

If I git clone https://github.com/mscdex/socksv5.git using https://github.com/mscdex/socksv5.git the entire dir structure is copied.

However, if I specify in my package: dependencies: { "socksv5": "git+https://github.com/mscdex/socksv5.git" } and run 'npm install' using npm v2.7.0 from io.js v1.5.0, there is no node_modules folder under ./node_modules/socksv5

mscdex commented 9 years ago

@mattcollier I just installed with node v0.10.36 / npm v1.4.28 and the node_modules directory is there when installed as dependency exactly as you've shown. So this seems like an npm (IMHO) bug.

mscdex commented 9 years ago

FWIW, related npm issue is here. It appears this is "by design" which is very unfortunate.

mscdex commented 9 years ago

Ok, there is a workaround in master that seems to work for both npm 1.x and 2.x. Please let me know if it works for you too.

mattcollier commented 9 years ago

Yes, it works well with npm v2.7.0. Thank you! And thanks for this module. This is the only module I've been able to find that does socks proxied DNS which allows me to lookup .onion addresses on tor!

mscdex commented 9 years ago

Thanks for the verification and for bringing this to my attention.

Honghe commented 8 years ago

npm 3.10.6 encounters this problem too. When I update npm3 from npm2 via npm i -g npm@3 without rm node_modules