"SyntaxError: Unexpected token function" when running Backstop
See original GitHub issueI want to give BackstopJS a try, but I’m not getting very far. Both backstop init
and the sanity test return the error “SyntaxError: Unexpected token function”.
C:\temp\backstopSanityTest>node node_modules/backstopjs/cli/index.js test --config=node_modules/backstopjs/test/configs/backstop
C:\temp\backstopSanityTest\node_modules\backstopjs\core\util\runPuppet.js:38
async function processScenarioView (scenario, variantOrScenarioLabelSafe, scenarioLabelSafe, viewport, config, runId) {
^^^^^^^^
SyntaxError: Unexpected token function
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\temp\backstopSanityTest\node_modules\backstopjs\core\util\createBitmaps.js:10:17)
at Module._compile (module.js:570:32)
I’ve tried with both a globally installed BackstopJS (npm install -g backstopjs
) and locally as suggested for the sanity test. I’ve also installed Python 3.6.5 and that is in the Path.
I am running Windows 10 without admin rights.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top 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 - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >[NODE-1908] async function* asyncIterator() { - SyntaxError
Hi, since the update to 3.2.1, I get this error when I try to start node and it seems related to this code...
Read more >Diff - b8a8cc1^! - platform/external/v8
During this + uninitialized state, code event handlers and function entry ... + + Run JS micro tasks in the appropriate context (Chromium...
Read more >The OCaml system release 4.03
11.4 Running executables produced by ocamlopt . ... 22.13 Module Hashtbl : Hash tables and hash functions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My fault, I was using an outdated Node. Updated Node, and everything seems to be running smooth now 😃
It’s happening here too [BackstopJS 3.2.16].