You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.
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
$ npm run build
> apps-script-starter@3.11.1 build /Users/a_long_path_to/copy_p_style
> webpack
Hash: 167d639bcef867803449
Version: webpack 4.41.2
Time: 374ms
Built at: 2019-11-12 6:48:29
Asset Size Chunks Chunk Names
appsscript.json 94 bytes [emitted]
code-3.11.1.js 4.79 KiB main [emitted] main
index.html 101 bytes [emitted]
sidebar.js 29 bytes [emitted]
Entrypoint main = code-3.11.1.js
[./src/index.js] 979 bytes {main} [built] [failed] [1 error]
ERROR in ./src/index.js
Module build failed (from ./node_modules/eslint-loader/dist/cjs.js):
TypeError: Cannot read property '0' of undefined
at Linter.autoFix (/Users/a_long_path_to/copy_p_style/node_modules/eslint-loader/dist/Linter.js:117:20)
at Linter.printOutput (/Users/a_long_path_to/copy_p_style/node_modules/eslint-loader/dist/Linter.js:77:12)
at /Users/a_long_path_to/copy_p_style/node_modules/eslint-loader/dist/cacheLoader.js:46:14
at /Users/a_long_path_to/copy_p_style/node_modules/loader-fs-cache/index.js:122:24
at Gunzip.cb (/Users/a_long_path_to/copy_p_style/node_modules/loader-fs-cache/index.js:47:14)
at Gunzip.zlibBufferOnEnd (zlib.js:139:10)
at Gunzip.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1183:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! apps-script-starter@3.11.1 build: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the apps-script-starter@3.11.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/my_user_name/.npm/_logs/2019-11-12T05_48_29_475Z-debug.log
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 function autoFix(), and line 117 was the line responsible for the stacktrace error that cause the exception. I have inserted an if() 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:
@endersaka I have very similar problem in my project, but I did a temporary solutuion without edit eslint code.
In my webpack config rules of eslint-loader I disabled option "fix" and it works, but I'm waiting for final solution.
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: