question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

failOnError() shows no file or line information with the error

See original GitHub issue

It just outputs the error message and a stack trace:

/Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/node_modules/map-stream/index.js:103
        throw err
              ^
ESLintError in plugin 'gulp-eslint'
Strings must use singlequote.
    at /Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/index.js:67:13
    at Array.some (native)
    at /Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/index.js:58:12
    at wrappedMapper (/Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/node_modules/map-stream/index.js:84:19)
    at Stream.stream.write (/Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/node_modules/map-stream/index.js:96:21)
    at Stream.ondata (stream.js:51:26)
    at Stream.EventEmitter.emit (events.js:95:17)
    at queueData (/Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/node_modules/map-stream/index.js:43:21)
    at next (/Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/node_modules/map-stream/index.js:71:7)
    at /Users/ed/dev/go/src/github.com/coreos-inc/roller/cp/node_modules/gulp-eslint/node_modules/map-stream/index.js:85:7

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
adametrycommented, Jan 26, 2015

In the latest version, I’ve added an experimental failAfterError method that will wait until the stream ends to fail. This method better works with the format method. Here’s an example:

gulp.src( stagedFilePaths )
    .pipe( eslint() )
    .pipe( eslint.format() )
    .pipe( eslint.failAfterError() );

I’d recommend this for independent tasks or were it’s acceptable to continue streaming after an error has been found. A benefit I see to this is that you can get a complete error report with exit code as apposed to receiving only the first error.

Feedback would be appreciated on this approach.

0reactions
adametrycommented, Oct 24, 2015

@kristianmandrup , it appears that gulp finishes the lint task with no warnings/errors, and then fails during your “test” task (i.e., $.mocha(...). The “npm ERR! Test failed. See above for more details.” is the message that npm test displays when the script “test” process exits with a non-zero exit code. Since there is no other message, I can only assume that the test is calling process.exit(1).

Anyway, if you can demonstrate how gulp-eslint is involved in your issue, please create a new issue so it can be tracked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

prevent Javadoc from failing gradle build
It is helpful to check the files you have, mine was an erroneous import (Android Databinding Library). Fixed by adding the correct config...
Read more >
How to let 'cp' command don't fire an error when source file ...
But this command fires an error if there is no .h file in ./src directory. How to make the command don't fire the...
Read more >
Apache Maven Compiler Plugin
Package info source files that only contain javadoc and no annotation on the package can lead to no class file being generated by...
Read more >
Error handling in playbooks
When Ansible receives a non-zero return code from a command or a failure from a module, by default it stops executing on that...
Read more >
Error handling and Go - The Go Programming Language
Open function returns a non-nil error value when it fails to open a file. func Open(name string) (file *File, err error). The following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found