max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
667 stars 114 forks source link

this.once is not a function after browserify build of 4.0.0 #114

Closed cordovapolymer closed 7 years ago

cordovapolymer commented 7 years ago

this.once is not a function after browserify build of 4.0.0, it was ok in prior versions

RangerMauve commented 7 years ago

Was this a browserify build or a react-native build? What version of browserify are you using and what are the configuration options that were passed in?

cordovapolymer commented 7 years ago

@RangerMauve , I tried building with browserify 14.1.0 and 14.3.0, I'm using it with https://github.com/arian/partition-bundle, here's the build script:

build.js

var browserify = require('browserify');

var b = browserify(['./lib/main', './lib/other']);

b.transform({
  global: true
}, 'uglifyify');

var output = './scripts/';
b.plugin('partition-bundle', { map: './lib/bundle.json', output: output, main: './main' });

bundle.json

{
  "/scripts/main.js": ["./main"],
  "/scripts/other.js": ["./other"]
}
mcollina commented 7 years ago

I've released readable-stream 2.2.9. Can you please check if it solves the problem?

cordovapolymer commented 7 years ago

@mcollina , yes it's resolved thank you!