Coder Social home page Coder Social logo

Comments (2)

erikbarke avatar erikbarke commented on May 8, 2024 1

I managed to workaround the ws issue by ignoring it in the bundler (same ugly workaround as in the webpack issue you you linked):

karmaTypescriptConfig: {
    bundlerOptions: {
       ignoredModuleNames: ["ws"]
    }
}

Now the integration test crashes on socket.iotrying to load package.json from socket.io-client, I'll have to fix that.

This is an age-old bundler conundrum; the bundler blindly parses all dependencies recursively looking for the word require without knowing in what context a module is required...

from karma-typescript.

erikbarke avatar erikbarke commented on May 8, 2024 1

@moshmage, socket.io uses the file system doing stuff like var read = require('fs').readFileSync; and read(require.resolve('socket.io-client/dist/socket.io.min.js'), 'utf-8'); which means it can't be run in a browser with Karma and karma-typescript 😞

A lot of bugs have been fixed and new functionality has been added thanks to this issue, but this is as far as we get, I can't run your example project in a browser due to the nature of socket.io.

from karma-typescript.

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.