Hi, I am super new to Airtable scripts and I am stuck with trying to fix this error. It looks like I need to add the topLevelAwait module somewhere, but not sure where.
So far what I did was to install the Hello-World app in my localhost and then replaced the contents of index.js with the contents of the [YouTube Example Script](https://airtable.com/marketplace/scraGQUFvORtvmHC5/import-youtube-analytics) since it does similar things to what I need and I would like to learn from it.
The issue is that when I do a block release I am getting:
ModuleParseError: Module parse failed: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it)
File was processed with these loaders:
* ../../../../usr/local/lib/node_modules/@airtable/blocks-cli/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
Running into the same problem. I can’t find anything else on topLevelAwait that’s explicitly related to Airtable, so must be a package that changed recently.
What you’ve linked is a script, but the error and other info you shared in your original post are related to custom apps. In short, you followed the instructions for creating a custom app, not installing a script.
To use the script that you found, just click the “Add Script” button on that page you linked. It’ll ask you for a base where you want it added, and it will automatically add the Scripting app and insert the code into it.
Sorry, but I haven’t had the time to work on custom apps for a while, and I haven’t even heard of this top-level-await feature. After a quick search, it turns out that it’s not Airtable-specific. I’ll let this page explain further:
If you want to go beyond that, my gut says that your favorite search engine should turn up enough info.
I’m familiar with the feature top-level-await, its usage, and its caveats! I was just hoping someone else here had tried it specifically with Airtable apps. I guess the answer is no. Thank you.
It’s only been two days since the initial post. I’d give it a bit more time before assuming that nobody here has used top-level-await with a custom Airtable app. (That said, this post will auto-close in three days because an earlier comment was marked as the solution, so it might be worth starting a new thread on this topic to keep the discussion going.)