Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

295
Views
Jest 'SyntaxError: missing ) after argument list' when following ES Module guide from docs

Following jest's official docs to enable ES Modules here: https://jestjs.io/docs/ecmascript-modules

I've followed step 1 by inserting the following config into package.json:

  "jest": {
    "transform": {}
  },

And then running the command they list in step 2

yarn node --experimental-vm-modules $(yarn bin jest)

Results in the following output/exception:

warning package.json: No license field
yarn node v1.22.5
warning package.json: No license field
C:\Users\david\source\repos\algo-ds\node_modules\.bin\jest:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
error Command failed.
Exit code: 1
Command: C:\Program Files\nodejs\node.exe
Arguments: --experimental-vm-modules C:\Users\david\source\repos\algo-ds\node_modules\.bin\jest
Directory: C:\Users\david\source\repos\algo-ds
Output:

info Visit https://yarnpkg.com/en/docs/cli/node for documentation about this command.

package.json

{
  "type": "module",
  "jest": {
    "transform": {}
  },
  "dependencies": {
    "@types/jest": "^28.1.3"
  },
  "devDependencies": {
    "jest": "^28.1.1"
  },
  "scripts": {
    "test": "jest"
  }
}

Using Node.js v16.15.1

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!