Skip to content

whop-proxy crashes with ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL on Node.js v22 #8

@rithiksai

Description

@rithiksai

🐛 Bug: CLI crash on Node.js v22

What happened

Running npm run dev with the default package.json script:

Bug Report

When running the default dev script in a project created from the whop-nextjs-app-template, the whop-proxy crashes on Node.js v22 due to stricter CLI argument parsing.

Error Output

TypeError [ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL]: Unexpected argument 'dev'. This command does not take positional arguments
at node:internal/util/parse_args/parse_args:387:15
...
Node.js v22.15.1

"dev": "whop-proxy --command 'next dev --turbopack'"

Causes this error:

TypeError [ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL]: Unexpected argument 'dev'.

Steps to Reproduce

  1. Use Node.js v22+
  2. Scaffold a new app with the Whop Next.js template
  3. Run npm run dev (with the default package.json script: "dev": "whop-proxy --command 'next dev --turbopack'")
  4. Observe the crash

Why It Happens

Node.js v22 uses stricter parsing rules via parseArgs(), and whop-proxy doesn’t currently handle quoted positional arguments like 'next dev --turbopack'.

Temporary Workaround

Downgrade to Node.js v20 (LTS) — which works fine with current whop-proxy.

Suggested Fix

  • Add explicit support for positional arguments in the CLI parser
  • Or document Node.js version requirements in the README/template generator

Would be happy to test or contribute a PR if helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions