Usage
Options
flag
Show help for this command. Can also use
-h.What It Checks
The check command analyzes four areas:- Imports: Scans source files for
next/*imports - Config: Analyzes
next.config.*for supported options - Libraries: Checks
package.jsondependencies for known libraries - Conventions: Examines file structure (pages, app, middleware, etc.)
Compatibility Scores
Each item gets a status:status
Feature works out of the box with no changes needed.
status
Feature works but with limitations or differences from Next.js.
status
Feature is not implemented or incompatible with vinext.
Example Output
How It Works
Import Scanning
Scans all.ts, .tsx, .js, .jsx, .mjs files for next/* imports:
import typestatements (type-only, erased at compile time)node_modules/,.next/,dist/,.git/directories
Config Analysis
Searchesnext.config.* for known config options:
basePath,trailingSlash,redirects,rewrites,headersi18n,env,images,output,transpilePackageswebpack,reactStrictMode,poweredByHeaderexperimental.ppr,experimental.typedRoutes,experimental.serverActionsi18n.domains
Library Checking
Readspackage.json and checks for known libraries:
- Auth:
next-auth,@auth/nextjs,@clerk/nextjs,better-auth - UI:
next-themes,nuqs,next-view-transitions,tailwindcss,styled-components,@emotion/react - Data:
prisma,drizzle,@t3-oss/env-nextjs,zod,react-hook-form - Monitoring:
@vercel/analytics,@sentry/nextjs - i18n:
next-intl - Components:
lucide-react,framer-motion,@radix-ui/*,shadcn-ui
Convention Checking
Examines file structure:- Router type: App Router (
app/), Pages Router (pages/), or both - Pages/routes: Counts pages, layouts, route handlers, API routes
- Special files:
_app,_document,middleware.ts,proxy.ts - Missing config:
"type": "module"in package.json - React canary APIs:
ViewTransitionusage - PostCSS config: String-form plugins that need resolution
Support Maps
Imports
Config Options
Libraries
Interpreting Results
High Compatibility (90%+)
Your project should work with minimal changes:- Run
vinext initto set up automatically - Start dev server:
npm run dev:vinext - Address any “partial” warnings if needed
Medium Compatibility (70-89%)
Most features work, but you’ll need to address some issues:- Review “unsupported” items in the report
- Plan migrations (e.g.,
next-auth→better-auth) - Run
vinext initto set up the basics - Test thoroughly and adjust
Low Compatibility (less than 70%)
Significant work required:- Review all unsupported features
- Check if alternatives exist (e.g., AMP → standard HTML)
- Consider gradual migration (run Next.js and vinext side-by-side)
- File issues for missing features you need
Common Issues and Solutions
Webpack Config Detected
Issue: You have custom webpack config innext.config.js
Solution: Migrate to Vite plugins. Most webpack loaders have Vite equivalents:
sass-loader→ Built into Vitebabel-loader→@vitejs/plugin-reactfile-loader→ Vite handles assets natively- Custom plugins → Check for Vite equivalents or write a Vite plugin
next-auth Detected
Issue:next-auth relies on Next.js internals
Solution: Migrate to better-auth:
Missing “type”: “module”
Issue: Yourpackage.json doesn’t have "type": "module"
Solution: Run vinext init to add it automatically, or add manually:
.cjs extension.
styled-components Detected
Issue: RequiresuseServerInsertedHTML (not yet implemented)
Solution: Either:
- Wait for
useServerInsertedHTMLsupport (tracked in issues) - Switch to CSS modules or Tailwind (both work perfectly)
- Use styled-components client-side only (not recommended for SSR)
Integration with vinext init
The check command runs automatically when you usevinext init:
Next Steps
init Command
Migrate your project automatically
Compatibility Guide
Deep dive into what’s supported