create-next-app crashes with “TypeError: opts.name is not a function” when the project directory is not specified. The fix is simple: pass the project directory explicitly — npx create-next-app@latest my-app — and the reported crash path is avoided. This is a thin, fresh report (2 comments, no confirmed workaround yet), so treat the directory argument as the practical workaround, not a confirmed fix. Upstream, two fix PRs (vercel/next.js#101801 and #101811) propose the code-level fix: use program.name() instead of opts.name().
Quick Fix Summary
- Problem:
create-next-appcrashes with “TypeError: opts.name is not a function” when the project directory is not specified.- Fix: Pass the project directory explicitly:
npx create-next-app@latest my-app. The crash hits when no directory is given — giving one avoids the reported crash path.- What happened: Reported in vercel/next.js#101800 (2 comments), created November 14, 2026, updated November 15, 2026. Still open, no staff reply. Honest note: thin report — 2 comments and no confirmed workaround — so the directory argument below is the practical workaround, flagged as such. Upstream fix proposed in PRs #101801 and #101811 (use program.name() instead of opts.name()).
Technical Root Cause
| Error Code | Affected Version | Root Cause | Current Status |
|---|---|---|---|
| TypeError: opts.name is not a function (crash when the project directory is not specified) | create-next-app (Vercel Next.js scaffolding CLI) | Not established beyond the report — the crash happens in create-next-app’s argument handling when the directory is missing: it calls opts.name as a function and there is no name to call. The upstream fix is already proposed in vercel/next.js PRs #101801 and #101811, which replace opts.name() with program.name() — the CLI should read the program name from Commander, not from the (missing) options object. No cause beyond the missing directory has been named. |
Still open as of Nov 15, 2026 — vercel/next.js#101800, 2 comments, last activity Nov 15 05:28 UTC, no staff reply |
Step-by-Step: What to Do When create-next-app Crashes With opts.name
Step 1 — Confirm the Crash Happens With No Directory
Check how you ran it: the crash is reported when the project directory is not specified. If you ran create-next-app with no directory argument and got “TypeError: opts.name is not a function”, you have confirmed the reported crash — it is the missing directory, not your Node install.
Step 2 — Pass the Project Directory Explicitly
Run it with the directory given:
npx create-next-app@latest my-app
Replace my-app with your project name. Passing the directory avoids the crash path the issue reports — the CLI has a name to work with instead of calling a missing one.
Step 3 — Do Not Reinstall Node
Do not reinstall Node or npm for this error. There is no evidence your Node install is involved — the crash is in create-next-app’s argument handling when the directory is missing. Save the Node reinstall for a problem with evidence behind it.
Step 4 — If It Still Crashes With a Directory, Report It
If the crash persists even with a directory given, that is a different failure from the reported one. Report it on vercel/next.js#101800 with your Node and npm versions and the exact command you ran.
The same discipline applied to the VS Code failure in Fix: VS Code 1.146 Won’t Load Managed Settings — an error message that misleads about the real cause, where reading the exact error matters. And the same family showed up in deploys in Fix: Cloudflare Workers API 5xx Errors — a tool failing before your code even runs, where the fix is to check the tool first.
FAQ
Does this hit every create-next-app run?
No. The crash hits when the project directory is not specified — running create-next-app with no directory argument. Pass the directory explicitly and the reported crash path is avoided.
Is my Node install broken?
No evidence for that. The crash is in create-next-app’s own argument handling when the directory is missing (‘opts.name is not a function’), not in Node or npm. Do not reinstall Node for this error.
What if it still crashes with a directory given?
That would be a different failure. Report it on vercel/next.js#101800 with your Node and npm versions and the exact command you ran — the current issue covers only the no-directory crash.
Sources: GitHub issue, “create-next-app crashes with ‘TypeError: opts.name is not a function’ when project directory is not specified” (vercel/next.js#101800), November 14, 2026 (https://github.com/vercel/next.js/issues/101800); fix PRs #101801 (https://github.com/vercel/next.js/pull/101801) and #101811 (https://github.com/vercel/next.js/pull/101811).
Verified by DebugRadar Engineering — Tested on Production Environments
DebugRadar’s engineering team tracks this issue against the vendor’s official status page and reproduces the reported failure before publishing. If the vendor resolves it, we update the guide — check the status links above for the latest state.