esm: SyntaxError: missing after argument list
See original GitHub issueI 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:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
as long as it works 🤗
You are right. I don’t know why it is working now both approach. Thanks.