Where locally can I find the .gs
files that clasp push
generates?
I'm using clasp push
to compile a TypeScript file into a .gs
file and upload it to Apps Script, but I'm getting an error:
$ clasp push
| Pushing files...Push failed. Errors:
{ Error: Syntax error: ParseError: Unexpected token . line: 253 file: Code.gs
The line number in the error is in terms of the compiled .gs
file, which does not get uploaded because of the error. I need to find the compiled local copy of the .gs file so I can inspect it and fix the error in the original .ts
typescript file, but where is the .gs
file?
My TypeScript file compiles without errors using tsc
.
Workaround:
Compile the typescript file, say
Code.ts
, into javascript yourself usingtsc
.Then validate the resulting local
Code.js
, for example byCode.gs
file in the Apps Script code editor. When you hit save, you'll hopefully see the same error.node --check Code.js
This will show you an error in terms of a file that you have access to.