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.

esm: SyntaxError: missing after argument list

See original GitHub issue

I am trying follow https://open-wc.org/testing/testing-karma.html#manual-setup and I got the error bellow. It seems it didn’t reconize esm configuration. I have just copied karma.conf.js.

`xxx C:_d\WSs\openwc-testing-vanilla-webcomponent

npm i --save-dev @open-wc/testing-karma deepmerge karma

npm WARN deprecated @types/deepmerge@2.2.0: This is a stub types definition. deepmerge provides its own type definitions, so you do not need this installed. npm WARN istanbul-instrumenter-loader@3.0.1 requires a peer of webpack@^2.0.0 || ^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself. npm WARN openwc-testing-vanilla-webcomponent No description npm WARN openwc-testing-vanilla-webcomponent No repository field. npm WARN openwc-testing-vanilla-webcomponent No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

  • deepmerge@4.0.0
  • karma@4.2.0
  • @open-wc/testing-karma@3.0.2 updated 3 packages and audited 3239 packages in 33.678s found 0 vulnerabilities

resource@DESKTOP-AKCNE7F C:_d\WSs\openwc-testing-vanilla-webcomponent

npm run test

@ test C:_d\WSs\openwc-testing-vanilla-webcomponent karma start --coverage

17 07 2019 13:52:41.192:ERROR [config]: Invalid config file! C:_d\WSs\openwc-testing-vanilla-webcomponent\karma.conf.js:18 esm: { ^^^

SyntaxError: missing ) after argument list at new Script (vm.js:80:7) at createScript (vm.js:274:10) at Object.runInThisContext (vm.js:326:10) at Module._compile (internal/modules/cjs/loader.js:664:28) at Object.Module._extensions…js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object.parseConfig (C:_d\WSs\openwc-testing-vanilla-webcomponent\node_modules\karma\lib\config.js:351:22) at new Server (C:_d\WSs\openwc-testing-vanilla-webcomponent\node_modules\karma\lib\server.js:65:24) at Object.exports.run (C:_d\WSs\openwc-testing-vanilla-webcomponent\node_modules\karma\lib\cli.js:291:7) at Object.<anonymous> (C:_d\WSs\openwc-testing-vanilla-webcomponent\node_modules\karma\bin\karma:3:23) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:712:10) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ test: karma start --coverage npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ test script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\resource\AppData\Roaming\npm-cache_logs\2019-07-17T16_52_41_255Z-debug.log`

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
daKmoRcommented, Jul 19, 2019

as long as it works 🤗

0reactions
jimisdrpccommented, Jul 19, 2019

You are right. I don’t know why it is working now both approach. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: missing ) after argument list · Issue #2248 - GitHub
The syntax error is likely a duplicate of #2230. From what I can tell, upgrading to at least Node.js 16 and importing assemblyscript/dist/asc.js ......
Read more >
JavaScript: SyntaxError: missing ) after argument list
I was using 'await' outside of an 'async' function and for whatever reason that results in a 'missing ) after argument list' error....
Read more >
SyntaxError: missing ) after argument list in JavaScript
The "SyntaxError: missing ) after argument list" occurs when we make a syntax error when calling a function, e.g. forget to separate its...
Read more >
JavaScript SyntaxError - Missing ) after argument list
This JavaScript exception missing ) after argument list occurs if there is an error in function calls. This could be a typing mistake,...
Read more >
Debug Jest Spec In VsCode - Error missing ) after argument list
There is a problem in the configuration. The default config tries to run the sh shell script of jest as a node program....
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