question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi I keep getting the following error, both on win10 and osx.

async function main() {
      ^^^^^^^^
SyntaxError: Unexpected token function
    at Object.exports.runInThisContext (vm.js:78:16)
    at Module._compile (module.js:545:28)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.runMain (module.js:607:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

My font names are as follows:

OperatorMono-Bold.oft

… and so on.

What am I doing wrong? Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Orilliancommented, Jan 23, 2018

@sdyrby This is an issue with the original font in certain editors. I’m not sure why this happens, but for example in LibreOffice Writer they look fine, but when using them in phpStorm I see the same thing as you.

LibreOffice Writer op-mono-libre

Op Mono Book no ligatures. op-mono-phpstorm

1reaction
kilimancommented, Jan 16, 2018

The script uses async/await so you’ll need to make sure you have Node.js v7.6 or higher.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError - JavaScript - MDN Web Docs
The SyntaxError object represents an error when trying to interpret syntactically invalid code. It is thrown when the JavaScript engine encounters tokens or ......
Read more >
How to Handle the Syntax Error in Javascript
The Javascript SyntaxError occurs when trying to interpret code that is not syntactically valid. It is thrown when the Javascript engine ...
Read more >
Syntax error - Wikipedia
In computer science, a syntax error is an error in the syntax of a sequence of characters or tokens that is intended to...
Read more >
Invalid Syntax in Python: Common Reasons for SyntaxError
If you've ever received a SyntaxError when trying to run your Python code, then this guide can help you. Throughout this tutorial, you'll...
Read more >
Ruby's SyntaxError Exception
SyntaxError. You shall not pass! Ruby's SyntaxError class. Raised when encountering Ruby code with an invalid syntax. eval("1+1=2"). raises the exception:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found