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.

SyntaxError: Unexpected token function

See original GitHub issue
The command "'relaxed' '/var/www/vhosts/idh-test/var/cache/dev/relaXed/45ca4a15f871c9/letter.pug' '--build-once'" failed.

Exit Code: 1(General error)

Working directory: /var/www/vhosts/idh-test/web

Output:
================


Error Output:
================
/var/www/vhosts/myHost/ReLaXed/src/index.js:119
var updateConfig = async function () {
^^^^^^^^

SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)

I have this error, I know that the doc says to update node. My node is already at v10.15.3, and my relaXed at 0.2.1. someone can help me?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DanielRufcommented, Apr 3, 2019

Can you symlink to the same binary or update both in some way?

Might work with su.

0reactions
NicolaPezcommented, Apr 3, 2019

Ok, now my user/bin/node is at the right version, and my flux are complete. Thanks for the support!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected token function - Async Await Nodejs
You'll need to transpile your code (e.g. using Babel) to a version of JS that Node understands if you are using an older...
Read more >
SyntaxError: Unexpected Token 'return' in JavaScript
The "Unexpected token return" error occurs when there is a syntax error in our JavaScript code, or the return statement is used outside...
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
Once that's done, the engine attempts to execute our statements in order. In situations where the syntax is wrong, we might encounter an ......
Read more >
Unexpected token error after adding await keyword to Node.js ...
This topic was automatically generated from Slack. You can find the original thread here. ... :sweat_smile: . You'll need to declare that function...
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