gulp+browserify - get file name/line on error - node.js

I use gulp to build my browserified files, problem is that when i have a syntax error the build fails with a generic message:
events.js:141
throw er; // Unhandled 'error' event
^ SyntaxError: Unexpected token
As you can see it's impossible to understand which file caused the error.
Is there a way to get the file name/line that caused the error?

Consider using gulp-debug https://github.com/sindresorhus/gulp-debug it is a plugin that help you see what files are run through your gulp pipeline

Related

events.js:180 throw er; // Unhandled 'error' event ^

Error while npm start in Windows 10
After npm install in vscode in my windows machine, I run npm, it starts but it shows the above error. I have cleaned cache but it did not solve.
I have searched on google but exception like this is not seen
events.js:180
throw er; // Unhandled 'error' event
^
This question is very similar to this one:
How can I fix ('throw er; // Unhandled 'error' event') code lifecycle?
For me personally, I fixed this exact issue by adding some missing environment variables to PATH.
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem

Mixin won't accept #content block with libsass

The error I get:
DEPRECATION WARNING: Passing white, a non-string value, to unquote()
will be an error in future versions of Sass.
on line 56 of src/scss/_library.scss
events.js:85
throw er; // Unhandled 'error' event
^
Error: src\scss\_library.scss
Error: Mixin "media" does not accept a content block.
Backtrace:
src/scss/_library.scss:27, in mixin `media-above`
src/scss/_layout.scss:16
on line 27 of src/scss/_library.scss
>> #include media($min-query, null) { #content;
-----------^
This is on windows 10 with all other gulpfile configs/tools working fine. I've tried npm update, npm rebuild node-sass, npm reinstall to cheack this. The mixin is loaded before the component styles.
It works fine with ruby-sass, this error appears when I'm using the libsass complier. Any ideas on why the content block cant be accpeted in the mixin?

Fb - Flo Error EBUSY hyberfil.sys

I just installed Fb Flo with Nodejs , copied the documentation example in a file and ran it like this : node flo.js and i get this error :
events.js:72
throw er; // Unhandled 'error' event
Error : EBUSY , lstat 'C:hiberfil:sys'
I read on a post that it's an error that happen when node try to write an admin system but no idea why I got this.
I'm running the terminal as admin .
Ty for your helps

node.js error: throw err; // Unhandled 'error' event. listen EADDRINUSE

I have a problem with uploading binary data to my server running node.js Express.
This is my code for the post function:
And this is the error message in terminal:
I cant find any unhandled errors tho..
Thankful for any help in the right direction! :)

Where is child_process.js?

I am trying to debug a problem with forever/nodejs, and I get this stacktrace in the error log:
chdir(): Permission denied
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn EACCES
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
This looks to me like I should be able to look at line 980 of a file named "child_process.js" to see where the error is thrown. However, I cannot locate such a file on the system even with "find". Am I missing it somehow, or is the stracktrace lying?
It's part of the node.js source. See https://github.com/joyent/node/blob/master/lib/child_process.js. I believe you can also step directly through core node code using node's built-in debugger, or a package such as node-inspector.

Resources