Skip to content

Commit

Permalink
Merge pull request #351 from menzow/feature/update-docs
Browse files Browse the repository at this point in the history
Add troubleshooting information for silenced errors
  • Loading branch information
goto-bus-stop committed May 16, 2018
2 parents d232754 + 8147bc5 commit 1917270
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ b.on('update', bundle);
bundle();

function bundle() {
b.bundle().pipe(fs.createWriteStream('output.js'));
b.bundle()
.on('error', console.error)
.pipe(fs.createWriteStream('output.js'))
;
}
```

Expand Down Expand Up @@ -242,6 +245,19 @@ and [stackoverflow](http://stackoverflow.com/questions/26708205/webpack-watch-is
Try the `--poll` flag
and/or renaming the project's directory - that might help.

## watchify swallows errors

To ensure errors are reported you have to add a event listener to your bundle stream. For more information see ([browserify/browserify#1487 (comment)](https://github.com/browserify/browserify/issues/1487#issuecomment-173357516) and [stackoverflow](https://stackoverflow.com/a/22389498/1423220))

**Example:**
```
var b = browserify();
b.bundle()
.on('error', console.error)
...
;
```

# see also

- [budo](https://www.npmjs.com/package/budo) – a simple development server built on watchify
Expand Down

0 comments on commit 1917270

Please sign in to comment.