Skip to main content
Scans an existing Next.js project and produces a detailed compatibility report showing which features are supported, partially supported, or unsupported by vinext.

Usage

Options

flag
Show help for this command. Can also use -h.

What It Checks

The check command analyzes four areas:
  1. Imports: Scans source files for next/* imports
  2. Config: Analyzes next.config.* for supported options
  3. Libraries: Checks package.json dependencies for known libraries
  4. 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:
Skips:
  • import type statements (type-only, erased at compile time)
  • node_modules/, .next/, dist/, .git/ directories

Config Analysis

Searches next.config.* for known config options:
Searches for these config options:
  • basePath, trailingSlash, redirects, rewrites, headers
  • i18n, env, images, output, transpilePackages
  • webpack, reactStrictMode, poweredByHeader
  • experimental.ppr, experimental.typedRoutes, experimental.serverActions
  • i18n.domains

Library Checking

Reads package.json and checks for known libraries:
Checks for:
  • 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:
Detects:
  • 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: ViewTransition usage
  • 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:
  1. Run vinext init to set up automatically
  2. Start dev server: npm run dev:vinext
  3. Address any “partial” warnings if needed

Medium Compatibility (70-89%)

Most features work, but you’ll need to address some issues:
  1. Review “unsupported” items in the report
  2. Plan migrations (e.g., next-authbetter-auth)
  3. Run vinext init to set up the basics
  4. Test thoroughly and adjust

Low Compatibility (less than 70%)

Significant work required:
  1. Review all unsupported features
  2. Check if alternatives exist (e.g., AMP → standard HTML)
  3. Consider gradual migration (run Next.js and vinext side-by-side)
  4. File issues for missing features you need

Common Issues and Solutions

Webpack Config Detected

Issue: You have custom webpack config in next.config.js Solution: Migrate to Vite plugins. Most webpack loaders have Vite equivalents:
  • sass-loader → Built into Vite
  • babel-loader@vitejs/plugin-react
  • file-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:
See migration guide: https://authjs.dev/getting-started/migrate-to-better-auth

Missing “type”: “module”

Issue: Your package.json doesn’t have "type": "module" Solution: Run vinext init to add it automatically, or add manually:
Rename CJS files to .cjs extension.

styled-components Detected

Issue: Requires useServerInsertedHTML (not yet implemented) Solution: Either:
  1. Wait for useServerInsertedHTML support (tracked in issues)
  2. Switch to CSS modules or Tailwind (both work perfectly)
  3. Use styled-components client-side only (not recommended for SSR)

Integration with vinext init

The check command runs automatically when you use vinext init:
Skip the check:

Next Steps

init Command

Migrate your project automatically

Compatibility Guide

Deep dive into what’s supported