gmail-automata
gmail-automata copied to clipboard
ReferenceError: utils_1 is not defined
The current script attached to the sheet linked in the README seems to have some errors. Symbols that come from the utils.gs
file are referenced with (0, utils_1.assert)
and similar instead of directly by name. This results in ReferenceError: utils_1 is not defined
when running the script.
This appears to be a duplicate of #59 (which has a PR ready to go)
Hey @Brinsky @mlsad3 Is there a solution for "ReferenceError: utils_1 is not definedDetails"
Yes, just add PR #59 from @aaronj1335 . It resolves this issue.
@mlsad3 is there a way to update the old script code with fix from @aaronj1335 directly in script.google.com and make it work with spreadsheets attache to it.
Yes.... you can, but it requires taking that updated sheet, opening the Extensions->Apps Script page, and copying the content of each of the scripts into your own (and making any new scripts if they don't already exist).
I made some potential updates for the spreadsheet to help describe how to update. See attached images below, in particular, the "Updating" section:
Ohh!! @mlsad3 Thank you for this awesome instructions
i did try to update script code manually after using an online compiler to turn ts to js (didn't want to setup local Dev Environment) after saving the project i lost 'Gmail Automata' button from the main menu in the spreadsheet(i tried adding trigger as suggested in the README but didn't work)
i'll try to setup clasp and test again.
If 'Gmail Automata' disappears, it's probably because your clasp setup worked and there is a script error. When it initializes the first time, it runs part of the script.
Click on 'Extensions' -> 'Apps Script', then inside the Apps Script, select the left menu "Executions" to analyze the log files (if any) of the extension.
Look for any mention of failure. Sometimes if it's too recent (a few seconds), you can click the refresh button to see if any logs were created.
Yes, you're right
but am lost here not sure why it give that error
Hmm,
Looks like your online flow does not utilize the .claspignore file, and it deployed the Condition.test.ts
file. That should not have happened, as they require Jest, and none of those libraries are ever deployed.
i did remove Condition.test.ts and the Gmail Automata button appear now but when trying to "Process Now" it fails
PR #59 recently (today) was merged, and should resolve that
Yes it did work now thanks again @mlsad3 for walking me through this. You're awesome.