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

Dependencies were not found: bufferutil, utf-8-validate #559

Closed
4 of 9 tasks
renjithspace opened this issue May 12, 2018 · 6 comments
Closed
4 of 9 tasks

Dependencies were not found: bufferutil, utf-8-validate #559

renjithspace opened this issue May 12, 2018 · 6 comments

Comments

@renjithspace
Copy link

renjithspace commented May 12, 2018

Description

When I try to install @slack/client I got Dependencies were not found error for following packages

  • bufferutil
  • utf-8-validate

What type of issue is this?

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Reproducible in:

@slack/client version: 4.2.2

node version: v8.11.1

OS version(s): Mac OS X 10.12.6

Steps to reproduce:

  1. $ npm install -g @vue/cli
  2. $ vue create my-project
  3. $ cd my-project
  4. $ npm install --save @slack/client
  5. Posting a message with Incoming Webhooks
  6. $ npm run dev

Expected result:

Successfull compilation

Actual result:

Compilation error:

These dependencies were not found:

* bufferutil in ./node_modules/ws/lib/buffer-util.js
* utf-8-validate in ./node_modules/ws/lib/validation.js

To install them, you can run: npm install --save bufferutil utf-8-validate

Attachments:

Compilation error after $ npm install --save @slack/client
Compilation error after $ npm install --save @slack/client

Compilation error after $ npm install --save bufferutil utf-8-validate
Compilation error after $ npm install --save bufferutil utf-8-validate

@aoberoi
Copy link
Contributor

aoberoi commented May 12, 2018

@renjithvk besides the compile-time warnings, are there actually any functional issues with running your application?

the two dependencies mentioned are not direct dependencies of @slack/client, they are actually dependencies of ws. in fact, they are native modules written in C++, and are optional dependencies of ws that are meant to improve performance. you wouldn't be able to depend on them in a browser context, so this warning should be expected.

at this moment, this package isn't truly tested for browser contexts. i'm happy to support that need, but i'll have to rely on use cases from users like yourself to guide me. thanks for reporting.

@aoberoi aoberoi added the needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info label May 12, 2018
@renjithspace
Copy link
Author

renjithspace commented May 12, 2018

@aoberoi Yes. The development server not getting started because of those warnings. So, I removed @slack/client and now using slack-node package instead.

I saw @slack/client has 28 dependencies and slack-node has only one. Yet the slack-node package working fine. I'm suggesting the @slack/client developers make sure the 28 dependencies are actually needed to get worked the @slack/client package modules.

Thanks

@aoberoi
Copy link
Contributor

aoberoi commented May 12, 2018

I'm glad you found a package that works for your needs!

This package and slack-node differ in many ways, which explains the difference in dependencies. In case anyone else that reads this wants to understand, slack-node does not provide a client for the RTM API (which is why choosing it helps avoid ws). It also doesn't have most of the features listed at the top of this page for the Web API.

@aoberoi aoberoi closed this as completed May 12, 2018
@aoberoi aoberoi removed the needs info An issue that is claimed to be a bug and hasn't been reproduced, or otherwise needs more info label May 12, 2018
@aoberoi
Copy link
Contributor

aoberoi commented May 12, 2018

Out of curiosity, I wanted to see how the bundle sizes of these packages compare. The number of dependencies doesn't really say much, since all the transitive dependencies of one package can easily outweigh many direct dependencies.

@slack/client bundles down to 60.3kb (min+gz) - this is probably too large for most client-side use cases. ⚠️

slack-node won't compile properly 🤷‍♂️

@clavin
Copy link
Contributor

clavin commented May 12, 2018

This inspires the question: what's the most common client-side use cases in the first place? Would a separation of this package into smaller chunks aid this issue? (which I talked a bit about in #410)

@aoberoi
Copy link
Contributor

aoberoi commented May 12, 2018

@clavin i'm interested in breaking this package into smaller ones. there is at least one downside to that, which is explaining to developers where to find which pieces. we could actually have the best of both worlds if we're willing to keep shipping @slack/client as a package of packages just to keep things simple for newcomers.

and in terms of client-side use cases, i'm kind of in the dark. one use case i know about is targeting Electron, but i'm still not very familiar with the motivations for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants