Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add troubleshooting information for silenced errors #351

Merged
merged 1 commit into from
May 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -221,6 +224,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