Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

gulpfile.babel.js error #209

Closed
genoma opened this issue Feb 12, 2016 · 6 comments
Closed

gulpfile.babel.js error #209

genoma opened this issue Feb 12, 2016 · 6 comments
Labels

Comments

@genoma
Copy link

genoma commented Feb 12, 2016

While linting gulpfile.bable.js Atom throws an error related, I believe, to linter-jshint.

TypeError: Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
    at TextBuffer.module.exports.TextBuffer.lineLengthForRow (/Applications/Atom Beta.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:460:29)
    at /Users/jenoma/.atom/packages/linter-jshint/lib/main.coffee:86:47
    at Array.map (native)
    at /Users/jenoma/.atom/packages/linter-jshint/lib/main.coffee:77:25

Could you please have a look at it?
Thanks.

@Arcanemagus
Copy link
Member

Can you post your gulpfile.bable.js so that we can reproduce this?

@genoma
Copy link
Author

genoma commented Feb 15, 2016

I've created a Gist for you, let me know if you need something else.
https://gist.github.com/genoma/e07ab7770e38dc6edbba

Thanks in advance.

@daltones
Copy link

I've been seeing this error last days. Then I realize that the problem was with my .jshintrc file.

I was using "es5": true and new versions of jshint ouputs ES5 option is now set per default. And then somehow linter-jshint crashes.

Dropping es5 option solved the problem for me.

@Arcanemagus
Copy link
Member

I bet you that it's outputting that directly to stdout (instead of stderr which would be handled properly and reported to the user...).

This plugin requests a JSON output, and it's feeding that sentence to it raw... which is invalid JSON. As it looks like this package doesn't have a maintainer currently I'll see if I have time later today to throw together a check as to whether the JSON parsing failed or not.

@steelbrain
Copy link
Contributor

JSON parsing error fixed by #210

@Arcanemagus
Copy link
Member

v2.0.0 has been published which should handle the JSON failing to parse properly and report it to the user, marking this as closed but if you have any further comments feel free to ask here 😉.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants