-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
🐛 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
- Use Node.js v22+
- Scaffold a new app with the Whop Next.js template
- Run
npm run dev
(with the defaultpackage.json
script:"dev": "whop-proxy --command 'next dev --turbopack'"
) - 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.
youngclaude
Metadata
Metadata
Assignees
Labels
No labels