-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Eliminate native dependencies #577
Comments
I absolutely haven't looked at the code, but there is probably 2 ways:
|
@feross This is something that Imho, |
@3rd-Eden what would be the downside of removing |
@maxogden The 2 binary addons are there for 2 different reasons:
|
Since both of those cases are currently optional, why not ship it without On Tuesday, September 8, 2015, Arnout Kazemier notifications@github.com
Sent from my phone |
+1, I'm recommending people not use Q: Is the module still RFC compliant if it isn't installed by default? also, @rom1504 just said that the utf-8 validation was done in JS with a link. Is that an acceptable replacement (and if so, why not include that in required deps?) |
Another solution would be to create a new module that didn't have any optionalDependencies and was pure js and just have |
@mafintosh that's a good idea. The main issue I have with the use of |
Crazy. They are optional?! I always wondered why everything works even if I see these errors. |
Isn't that planned for npm@3? "built-in support for precompiled dependencies" |
There are also various options ready to go today to handle prebuilt binaries that popular native addons like leveldown, sqlite3 use: https://www.npmjs.com/package/node-pre-gyp https://www.npmjs.com/package/prebuild I think using either of the above modules would also help address this issue, but not solve it. I don't think waiting on npm is a good strategy when it can be fixed now. I would personally like a way to use |
An alternate solution would be to publish a new package that only has the native dependencies. A "ws-native" and a "ws". So we can have the best of both worlds and have authors decide on what they want to use
|
@3rd-Eden that would work for our use case |
I like the idea of two packages: And I like @mafintosh's suggestion for how to accomplish this. So we publish a new major version of That way we're not maintaining two parallel codebases. |
@3rd-Eden What do you think of my last suggestion? Would you accept a PR with those changes? |
@3rd-Eden Ping! I have some free time now. Would you accept a PR that implements #577 (comment) ? |
Oooh, nice – I see that you just committed this change! Excellent, I will close this issue now. |
For posterity: 49b1109 |
Because of the
bufferutil
andutf-8-validate
dependencies inws
, many users see cryptic errors when installingws
or anything that depends on it.Here's an example: "I can't build torrent-stream on my machine. It complains about MSB3428 (visual c++) when triggering node-gyp."
Here's another example, from my machine:
Keep in mind for that last example of error spew, I actually have the OS X command line tools installed. Apparently, a compiler toolchain is still not enough. You actually need to install an IDE – Xcode. This is unreasonable.
It's true that these are optional dependencies... but npm's UX is really bad here. Error messages are displayed to the end user so they usually think something went wrong during installation. I keep getting asked about this.
The optional deps make it really hard to depend on
ws
in command line tools that normal users (i.e. not module authors) will be installing.Can we discuss how we might eliminate these native dependencies?
cc @maxogden @mafintosh
The text was updated successfully, but these errors were encountered: