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

Instructions on "Getting Started: Setup" section fails to run on Node env #11

Open
sashakhad opened this issue Jul 13, 2021 · 0 comments

Comments

@sashakhad
Copy link

Hi there! Thanks for all the work you've put into the RUN protocol -- it's a been fun getting to know it.

I noticed that the setup instructions do not run in a node environment as promised. The failing line of code is:

await jig.sync()

... which leads to the error:

SyntaxError: await is only valid in async function

This is a common error caused by an await keyword being used outside of an async function (fairly obvious from the error message). You can fix this error by placing the call in an async function, like so:

async function syncJig() {
  await jig.sync()
  console.log(jig.owner)
  console.log(jig.location)
  console.log(jig.origin)
}

syncJig();

Normally, I'd submit a pull request but noticed that there's only minified code available on the repo in the dist directory.

I hope this suggestion helps you and others who look into RUN. :)

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

1 participant