Closed singuerinc closed 6 years ago
browserify-middleware passes the error to express's next
function. If you have a default express setup with no custom error handling middleware, you'll get an error printed just like you would expect. If you have your own custom error handling middleware it will use that.
Hello, does this work for errors in my browserified code? When I am missing a brace somewhere I get the singularly unhelpful code on my browser console: Error SyntaxError: expected expression, got '<'[Learn More] main.js:1
This really doesn't tell me anything considering that line one has a require to a module that has a lot of code in it as well as having several requires itself. I placed an error handler after my code and am sending the error to console.log, but nothing is happening. What else should I do?
My error handler looks like: .use((err, req, res, next) =>{ console.log(err) next(err) })
It is at the very end of my app.use chain.
Hi, I'm having some problems to see what kind of errors has my code. Right now when I make a mistake I don't have a proper way to figure out what is happening.
If I run
browserify
from the command line I see:Error: Cannot find module 'FadeInOutRegion' from '/src/app/js/views'
but with
browserify-middleware
no error is displayed, it remains forever in that request.GET /assets/js/bundle.js - - ms - -
This is the way I'm doing now:
There is a property or callback or something that I can write to the console? Thanks