jsdf / browserify-incremental

incremental rebuild for browserify
175 stars 13 forks source link

Error: bundle() no longer accepts option arguments. #1

Closed LeonB closed 9 years ago

LeonB commented 9 years ago

I'm getting an error while using browserify-incremental with gulp:

[gulp] Using gulpfile ~/Public/advertentietool/gulpfile.js
[gulp] Starting 'watch'...
[gulp] Finished 'watch' after 813 ms
[16:19:16] Live reload server listening on: 35729
[16:19:18] calendar.js was reloaded.
[gulp] Starting 'javascripts'...

/home/leon/Public/advertentietool/node_modules/browserify/index.js:569
        throw new Error(
              ^
Error: bundle() no longer accepts option arguments.
Move all option arguments to the browserify() constructor.
    at Browserify.bundle (/home/leon/Public/advertentietool/node_modules/browserify/index.js:569:15)
    at Browserify.b.bundle (/home/leon/Public/advertentietool/node_modules/browserify-incremental/node_modules/browserify-cache-api/index.js:57:21)
    at Browserify.b.bundle (/home/leon/Public/advertentietool/node_modules/browserify-incremental/index.js:40:21)
    at /home/leon/Public/advertentietool/gulpfile.js:66:10
    at Transform.write [as _transform] (/home/leon/Public/advertentietool/node_modules/vinyl-transform/index.js:14:18)
    at Transform._read (/home/leon/Public/advertentietool/node_modules/vinyl-transform/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (/home/leon/Public/advertentietool/node_modules/vinyl-transform/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/home/leon/Public/advertentietool/node_modules/vinyl-transform/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/home/leon/Public/advertentietool/node_modules/vinyl-transform/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Transform.Writable.write (/home/leon/Public/advertentietool/node_modules/vinyl-transform/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)

This is how I'm using browserify-incremental:

      var args = {
          paths: [paths.src.javascripts]
      };

      var b = browserify(filename, args);
      var bi = browserifyInc(b);
      return bi
        // Configure transforms in package.json?
        .bundle();
jsdf commented 9 years ago

Thanks, I'll look into it. If you need it to work ASAP you could roll back to browserify 4.x.x

LeonB commented 9 years ago

Thanks! Browserify 4.2.3 throws an error for me. I don't know exactly why so I'm sticking with 5 at the moment. I've tried messing around with the browserify-incremental code but I couldn't get it to work :(