Git Product home page Git Product logo

Comments (4)

davidgranstrom avatar davidgranstrom commented on August 16, 2024

Looks like osc.js has a similar issue

I will includedist/osc.min.js using a standard script tag for now.

from osc-js.

adzialocha avatar adzialocha commented on August 16, 2024

Thank you for this one!

dgram, utf-8-validate and bufferutil are all non-browser dependencies. I agree that there should be a note for webpack users (or any other browser-related build) to configure the tool accordingly.

Does it work if you set the other dependencies to empty as well? Like:

node: {
    fs: 'empty',
    tls: 'empty',
    utf-8-validate: 'empty',
    dram: 'empty',
    bufferutil: 'empty'
}

from osc-js.

davidgranstrom avatar davidgranstrom commented on August 16, 2024

Thank you for your quick response! I got it working with:

  node: {
    fs: 'empty',
    tls: 'empty',
    dgram: 'empty',
    ws: 'empty',
  },

There are still two warnings [1] that I couldn't get rid off (I really need to learn more about Webpack), but it seems to be working now! I managed to create an instance of osc-js and printed it to the console.

[1]:

WARNING in ./~/ws/lib/BufferUtil.js
Module not found: Error: Can't resolve 'bufferutil' in '/Users/$HOME/code/javascript/test/node_modules/ws/lib'
 @ ./~/ws/lib/BufferUtil.js 10:19-40
 @ ./~/ws/lib/Sender.js
 @ ./~/ws/index.js
 @ ./~/osc-js/lib/osc.js
 @ ./src/app.js
 @ ./src/index.js

WARNING in ./~/ws/lib/Validation.js
Module not found: Error: Can't resolve 'utf-8-validate' in '/Users/$HOME/code/javascript/test/node_modules/ws/lib'
 @ ./~/ws/lib/Validation.js 10:19-44
 @ ./~/ws/lib/Receiver.js
 @ ./~/ws/index.js
 @ ./~/osc-js/lib/osc.js
 @ ./src/app.js
 @ ./src/index.js

from osc-js.

adzialocha avatar adzialocha commented on August 16, 2024

To prevent bundling errors with Webpack etc. I introduced an alternative library version osc.browser.js (#20) which can be used in Webpack builds (read this Wiki for further information). @davidgranstrom

from osc-js.

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.