{"action":"created","issue":{"url":"https://api.github.com/repos/substack/node-browserify/issues/1198","labels_url":"https://api.github.com/repos/substack/node-browserify/issues/1198/labels{/name}","comments_url":"https://api.github.com/repos/substack/node-browserify/issues/1198/comments","events_url":"https://api.github.com/repos/substack/node-browserify/issues/1198/events","html_url":"https://github.com/substack/node-browserify/issues/1198","id":66521344,"number":1198,"title":"exception: browserify + vinyl-transform","user":{"login":"BibbyChung","id":8520661,"avatar_url":"https://avatars.githubusercontent.com/u/8520661?v=3","gravatar_id":"","url":"https://api.github.com/users/BibbyChung","html_url":"https://github.com/BibbyChung","followers_url":"https://api.github.com/users/BibbyChung/followers","following_url":"https://api.github.com/users/BibbyChung/following{/other_user}","gists_url":"https://api.github.com/users/BibbyChung/gists{/gist_id}","starred_url":"https://api.github.com/users/BibbyChung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BibbyChung/subscriptions","organizations_url":"https://api.github.com/users/BibbyChung/orgs","repos_url":"https://api.github.com/users/BibbyChung/repos","events_url":"https://api.github.com/users/BibbyChung/events{/privacy}","received_events_url":"https://api.github.com/users/BibbyChung/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-06T04:08:17Z","updated_at":"2015-10-27T20:39:03Z","closed_at":"2015-04-06T11:43:18Z","body":"Hi,\r\n\r\nIt's my gulpfile.js setting.\r\n\r\n```javascript\r\n//gulpfile.js\r\n\r\nvar gulp = require(\"gulp\");\r\nvar browserify = require(\"browserify\");\r\nvar transform = require(\"vinyl-transform\");\r\nvar rename = require(\"gulp-rename\");\r\n\r\ngulp.task(\"scripts\", function () {\r\n    var browserified = transform(function (filename) {\r\n        var b = browserify(filename);\r\n\r\n        return b.bundle();\r\n    });\r\n\r\n    return gulp.src([\r\n        \"./test/myApp/_module.js\"\r\n    ])\r\n    .pipe(browserified)\r\n    .pipe(rename(\"app.js\"))\r\n    .pipe(gulp.dest(\"./test/\"));\r\n});\r\n```\r\nWhen I use latest version of browserify, this exception are as follows.\r\n\r\n```javascript\r\n_stream_readable.js:540\r\n    var ret = dest.write(chunk);\r\n                   ^\r\nTypeError: undefined is not a function\r\n    at Producer.ondata (_stream_readable.js:540:20)\r\n    at Producer.emit (events.js:107:17)\r\n    at Producer.Readable.read (_stream_readable.js:373:10)\r\n    at flow (_stream_readable.js:750:26)\r\n    at resume_ (_stream_readable.js:730:3)\r\n    at _stream_readable.js:717:7\r\n    at process._tickCallback (node.js:355:11)\r\nProcess terminated with code 1.\r\n```\r\nHowever, I downgrade to v9.0.4, anything will be ok.\r\nWho can talk me how to fix it ? \r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/substack/node-browserify/issues/comments/151636860","html_url":"https://github.com/substack/node-browserify/issues/1198#issuecomment-151636860","issue_url":"https://api.github.com/repos/substack/node-browserify/issues/1198","id":151636860,"user":{"login":"philkunz","id":5952814,"avatar_url":"https://avatars.githubusercontent.com/u/5952814?v=3","gravatar_id":"","url":"https://api.github.com/users/philkunz","html_url":"https://github.com/philkunz","followers_url":"https://api.github.com/users/philkunz/followers","following_url":"https://api.github.com/users/philkunz/following{/other_user}","gists_url":"https://api.github.com/users/philkunz/gists{/gist_id}","starred_url":"https://api.github.com/users/philkunz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philkunz/subscriptions","organizations_url":"https://api.github.com/users/philkunz/orgs","repos_url":"https://api.github.com/users/philkunz/repos","events_url":"https://api.github.com/users/philkunz/events{/privacy}","received_events_url":"https://api.github.com/users/philkunz/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T20:39:03Z","updated_at":"2015-10-27T20:39:03Z","body":"If someone is looking for an easy approach:\r\ncheck out our https://www.npmjs.com/package/gulp-browser package\r\n\r\n```javascript\r\nvar gulp = require(\"gulp\");\r\nvar gulpBrowser = require(\"gulp-browser\");\r\n\r\ngulp.task('gulpBrowserTest',function() {\r\n    var stream = gulp.src('./test/*.js')\r\n        .pipe(gulpBrowser.browserify())\r\n        .pipe(gulp.dest(\"./test/browserifiedJS/\"));\r\n    return stream;\r\n});\r\n```"}}