center-code icon indicating copy to clipboard operation
center-code copied to clipboard

Error when has async function

Open justforuse opened this issue 3 years ago • 0 comments

I just tried this code test.js:

async function foo() {
    console.log('Hello world!')
}

hello()

and run center test.js

it tells me:

// other logs...
at IO.unsafePerformIO (/Users/xxx/.nvm/versions/node/v14.17.6/lib/node_modules/center-code/node_modules/ramda/dist/ramda.js:44:27) {
  lineNumber: 1,
  description: 'Unexpected token function',
  index: 6,
  message: 'Unable to perform highlight. The code contained syntax errors: Line 1: Unexpected token function'
}

justforuse avatar May 24 '22 14:05 justforuse