Skip to content

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

@sashakhad

Description

@sashakhad

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. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions