Giter Site home page Giter Site logo

Comments (2)

stuhowarth avatar stuhowarth commented on July 18, 2024

I did manage to get rid of the dgram issues through various plugins and altering webpack fallbacks to use the alternative modules such as dgram-browserify, https-browserify. These errors did disappear but then I was getting another error, unfortunately I've been doing lots of testing and removed all the packages I added so its hard for me to get back to that particular error but it was something to do with socket-io (This is used to shim the dgram stuff etc within a browser). I'm thinking what I am trying to do just isn't possible but maybe others have managed to do it. Its not the end of the world as I can access the HUE API's, I just liked the idea this can access the bridge remotely as this is a feature we would like for our solution. If anybody can help then great :)

from node-hue-api.

peter-murray avatar peter-murray commented on July 18, 2024

What version of the library are you using when you get this error?

I have made a number of changes to move the dgram discovery aspect out in to a separate part of the library that you can import to avoid the Node.js specific stuff when operating in the browser.

There is a way to import only the API aspects and avoid the discovery part of the library (which is useless in the browser) but this separate could only be done in a breaking change, so requires a major version number bump, which was version 5.x.

You are going to need to avoid the direct import of the library and instead only import the api part of the library to achieve what you want as the v3 and default index import (without filtering) will try to bring in the discovery parts for backwards compatibility.

Now that the library is in TypeScript that might be more complex as it might be implicitly pulling in the discovery parts by mistake, so if you can provide an example of what you are doing to generate the problem, I can work on fixing that if there is still an issue in this space.

from node-hue-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.