-
Notifications
You must be signed in to change notification settings - Fork 13
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
Cannot read property 'messages' of undefined #128
Comments
Thanks for reporting! Looks like eslint is producing some output that bulk-decaffeinate can't parse. bulk-decaffeinate invokes eslint with There's a daily build that uses the latest bulk-decaffeinate against the latest eslint ( https://travis-ci.org/decaffeinate/decaffeinate-example-builder ) and it's not broken, so I imagine this may be something specific to your case. But regardless, bulk-decaffeinate should be better about how it handles the eslint output. |
Looking into it further, for some reason it is not making the .js files Situation: directory with .coffee, and auto created .map. and .js Coworker ran it on same code base with same versions and didn't encounter this situation. |
Solved via disabling the coffee compiler, duh. Feel free to close this (unless want to add additional error handling to catch 1) .js not being generated correctly 2) error in eslint json where message is not always set ). |
I have this error, too. :/ It's super annoying to run into this after a ~30min conversion (large code base). How exactly did you solve it?
What exactly did you do here? Thank you for your help! |
@tim-kos does it always happen or just on a giant codebase? For a real production conversion, it's maybe best to do it incrementally anyway. At my work the most I converted at once was about 20,000 lines. The code for the error is here: Something is going wrong with One thing that I remember is that ESLint sometimes gave more output than the default node buffer size, so I bumped the limit to 10MB of output. But maybe you have a giant file that has more than 10MB of ESLint errors after decaffeinate.
My impression was that they had the CoffeeScript compiler running in watch mode that was compiling .coffee to .js, and that was causing conflicts with the JS files being produced by decaffeinate. |
Hey there, Thanks for the hint. Btw, in the (dist) source I found
However, that config is not documented in |
It's also not in the commander options. I have manually added it and am now re-running the conversion. The reason is, I want to get an idea of how big this job would be by doing a full conversion in a branch, and then running our testsuite (close to 100% coverage) on it. : ] |
@tim-kos cool, hope that's a reasonable workaround for you. I mostly added And yep, makes sense you'd want to try out decaffeinate on the whole thing for testing purposes, I've certainly done that plenty of times myself. I guess if it's just for testing then running |
When I try to bulk-decaffeinate some files, I get this error:
Running eslint --fix on all files..
TypeError: Cannot read property 'messages' of undefined
at runEslint$ (/usr/local/lib/node_modules/bulk-decaffeinate/dist/bulk-decaffeinate.js:2590:38)
at tryCatch (/usr/local/lib/node_modules/bulk-decaffeinate/node_modules/regenerator-runtime/runtime.js:65:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/bulk-decaffeinate/node_modules/regenerator-runtime/runtime.js:303:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/bulk-decaffeinate/node_modules/regenerator-runtime/runtime.js:117:21)
at tryCatch (/usr/local/lib/node_modules/bulk-decaffeinate/node_modules/regenerator-runtime/runtime.js:65:40)
at invoke (/usr/local/lib/node_modules/bulk-decaffeinate/node_modules/regenerator-runtime/runtime.js:155:20)
at /usr/local/lib/node_modules/bulk-decaffeinate/node_modules/regenerator-runtime/runtime.js:165:13
Tried with both latest version of eslint and 4.0 rc, no happens both times.
Will update if I get any more info on it
The text was updated successfully, but these errors were encountered: