0

I'm trying to run an sbt command in yarn (any at all), and every time I run it I get this error

$ yarn sbt
yarn run v1.22.19
warning apache-daffodil-vscode@1.2.0: The engine "vscode" appears to be invalid.
$ sbt universal:packageBin
~\node_modules\argparse\argparse.js:362
        throw new TypeError(sub('%s() missing %i required positional argument%s: %s',
        ^

TypeError: HelpFormatter() missing 1 required positional argument: 'prog'
    at _parse_opts (~\node_modules\argparse\argparse.js:362:15)
    at new HelpFormatter (~\node_modules\argparse\argparse.js:450:13)
    at new HelpFormatter (~\node_modules\argparse\argparse.js:205:28)
    at Object.<anonymous> (~\node_modules\sbt\backuptool.js:227:43)
    at runFactory (~\node_modules\amdefine\amdefine.js:183:30)
    at define (~\node_modules\amdefine\amdefine.js:277:13)
    at Object.<anonymous> (~\node_modules\sbt\backuptool.js:13:1)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)

Directory tree shortened to make it look nicer.

yarn sbt just runs the command sbt universal:packageBin, which when ran alone in the command line works fine. If I change yarn sbt to just be simply sbt compile, or any other sbt command I get the same error, while the commands continue to work if just ran through the command line.

I've tried editing argparse to provide every option that it gives for default in the command line, but none of those work. The same exact code works fine on linux, but gives this error on both windows 10 and 11 on different machines.

NolanPower
  • 409
  • 3
  • 11

0 Answers0