Skip to content
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

ReferenceError: utils_1 is not defined #61

Open
Brinsky opened this issue May 26, 2022 · 12 comments
Open

ReferenceError: utils_1 is not defined #61

Brinsky opened this issue May 26, 2022 · 12 comments

Comments

@Brinsky
Copy link

Brinsky commented May 26, 2022

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.

@mlsad3
Copy link
Contributor

mlsad3 commented Jul 30, 2022

This appears to be a duplicate of #59 (which has a PR ready to go)

@Deybat
Copy link

Deybat commented Aug 7, 2022

Hey @Brinsky @mlsad3
Is there a solution for "ReferenceError: utils_1 is not definedDetails"

@mlsad3
Copy link
Contributor

mlsad3 commented Aug 7, 2022

Yes, just add PR #59 from @aaronj1335 . It resolves this issue.

@Deybat
Copy link

Deybat commented Aug 11, 2022

@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.

@mlsad3
Copy link
Contributor

mlsad3 commented Aug 12, 2022

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:

gmailautomata1
gmailautomata2

@Deybat
Copy link

Deybat commented Aug 12, 2022

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.

@mlsad3
Copy link
Contributor

mlsad3 commented Aug 12, 2022

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.

image

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.

@Deybat
Copy link

Deybat commented Aug 15, 2022

Yes, you're right
but am lost here not sure why it give that error
Screenshot from 2022-08-15 13-16-16

@mlsad3
Copy link
Contributor

mlsad3 commented Aug 15, 2022

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.

@Deybat
Copy link

Deybat commented Aug 15, 2022

i did remove Condition.test.ts and the Gmail Automata button appear now but when trying to "Process Now" it fails
Screenshot from 2022-08-15 19-55-24

@mlsad3
Copy link
Contributor

mlsad3 commented Aug 15, 2022

PR #59 recently (today) was merged, and should resolve that

@Deybat
Copy link

Deybat commented Aug 15, 2022

Yes it did work now thanks again @mlsad3 for walking me through this. You're awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants