This repository has been archived by the owner on Sep 28, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 121
TypeError: Cannot read property '0' of undefined #306
Comments
UpdateSince I am going on with my development I created a Git tag of the commit where I found the error. It is eslint-loader_failure. |
@endersaka I have very similar problem in my project, but I did a temporary solutuion without edit eslint code. |
Good to know @mrkitan, thanks for the suggestion. |
Hi @endersaka |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behavior
To fluently build the project. This is the expected output.
Actual Behavior
This project has been created based on labnol/apps-script-starter. I was just preparing it, guessing where to insert my code in the project and figuring out how is structured. So, essentially, at this point there is almost no major changes in my configuration. Except for line 19 in ".eslintrc" file (the one with the code
"no-unused-vars": "off"
).I added this line because original project configuration prevented successful build. Since my code is in development phase I don't care if there are non used variables or functions. I will clean up later.
But, after this modification I got the following building error.
Code
How Do We Reproduce?
You can simply clone my project repository https://github.com/endersaka/gas-copy-gdocs-paragraph-style,
cd
inside it, then runnpm install
followed bynpm run build
.Actually I found a way to "resolve" it but I don't know if it can be considered a correct fix because I don't know the logic of eslint-loader. Though, as I said, I modified the
node_modules/eslint-loader/dist/Linter.js
file. At line 116, in fact, there is the definition of functionautoFix()
, and line 117 was the line responsible for the stacktrace error that cause the exception. I have inserted anif()
just before the line causing the error to "dodge" it, as you can see in this screenshot eslint-loader possible fix.In the development file Linter.js function
autoFix()
is defined at line 110.The text was updated successfully, but these errors were encountered: