{"id":22535,"library":"vinext","title":"vinext","description":"A drop-in replacement for the Next.js CLI that runs on Vite instead of the Next.js custom server. Currently at v0.0.44 (pre-1.0, active development with frequent releases every few days). It reimplements the Next.js API surface on top of Vite, supporting both Pages Router and App Router, with HMR, build, deploy to Cloudflare Workers, and standalone self-host output. Key differentiators: AI-assisted development (Claude Code generated most of the code), tight Cloudflare integration. Caveat: experimental, buggy, and lacks full Next.js compatibility. Requires Node >=22 and Vite 7 or 8.","status":"active","version":"0.0.44","language":"javascript","source_language":"en","source_url":"https://github.com/cloudflare/vinext","tags":["javascript","typescript"],"install":[{"cmd":"npm install vinext","lang":"bash","label":"npm"},{"cmd":"yarn add vinext","lang":"bash","label":"yarn"},{"cmd":"pnpm add vinext","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core dependency; vinext builds on top of Vite's dev server and build pipeline","package":"vite","optional":false},{"reason":"Required for React JSX transform and Fast Refresh support","package":"@vitejs/plugin-react","optional":false},{"reason":"Required for App Router support (React Server Components)","package":"@vitejs/plugin-rsc","optional":true},{"reason":"Required for App Router support (RSC runtime)","package":"react-server-dom-webpack","optional":true}],"imports":[{"note":"Scripts should use 'vinext' instead of 'next'. Running 'next dev' will use the original Next.js CLI, not vinext.","wrong":"npx next dev","symbol":"vinext CLI","correct":"npx vinext dev"},{"note":"Replace 'next' with 'vinext' in npm scripts. The CLI is a drop-in replacement for the 'next' command.","wrong":"\"dev\": \"next dev\"","symbol":"Package scripts (package.json)","correct":"\"dev\": \"vinext dev\""},{"note":"vinext is ESM-only; no CommonJS require support. Use dynamic import() if needed in CJS contexts.","wrong":"const { check } = require('vinext')","symbol":"vinext.check() (programmatic API)","correct":"import { check } from 'vinext'"}],"quickstart":{"code":"// Install vinext and its peer dependencies\nnpm install -D vinext vite @vitejs/plugin-react\n\n// If using App Router, also install:\nnpm install -D @vitejs/plugin-rsc react-server-dom-webpack\n\n// In package.json, replace 'next' with 'vinext':\n// {\n//   \"scripts\": {\n//     \"dev\": \"vinext dev\",\n//     \"build\": \"vinext build\",\n//     \"start\": \"vinext start\"\n//   }\n// }\n\n// Then run:\n// vinext dev     - Development server with HMR\n// vinext build   - Production build\n// vinext start   - Start local production server\n\n// For existing Next.js projects, check compatibility first:\n// npx vinext check\n\n// To migrate automatically (using AI skill):\n// npx skills add cloudflare/vinext\n// Then in your AI tool: \"migrate this project to vinext\"","lang":"javascript","description":"Installs vinext and peer dependencies, replaces next CLI with vinext in package.json scripts, and provides CLI usage for dev/build/start."},"warnings":[{"fix":"Upgrade Node to v22 or later.","message":"Requires Node >=22; older Node versions (e.g., 18, 20) will fail to run vinext.","severity":"breaking","affected_versions":"<0.0.1"},{"fix":"Set HOST instead of HOSTNAME in your environment/deployment config.","message":"vinext uses HOST environment variable for bind address, not HOSTNAME (which Next.js uses). This can cause port binding failures in deployment scripts that rely on HOSTNAME.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Update deployment to use 'node dist/standalone/server.js' and set PORT/HOST env vars.","message":"Standalone build output differs from Next.js standalone; vinext emits to dist/standalone/ and expects different startup command (node dist/standalone/server.js).","severity":"gotcha","affected_versions":">=0.0.39"},{"fix":"Use --help to check current options; prefer manual migration if automated init fails.","message":"The init command may prompt for options that are not yet implemented or have changed (e.g., --port may not work as expected).","severity":"deprecated","affected_versions":"<0.1.0"},{"fix":"Run 'vinext check' before migrating to identify unsupported features.","message":"Not all Next.js features are supported; vinext is experimental and may have bugs with edge cases like intercepting routes, custom error pages, or advanced caching.","severity":"gotcha","affected_versions":"<1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run: npm install -D vite@^7.0.0","cause":"Missing peer dependency: vite is not installed.","error":"Error: Cannot find module 'vite'"},{"fix":"Run: npm install -D @vitejs/plugin-react@^5.1.4 || ^6.0.0","cause":"Missing or incompatible @vitejs/plugin-react version.","error":"Error: @vitejs/plugin-react is required for vinext to run"},{"fix":"Upgrade Node.js to v22 or later (e.g., using nvm: nvm install 22)","cause":"Node.js version too old.","error":"Error: Node.js version 20.x.x is not supported. Vinext requires Node.js >=22."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}