Complete project migration from React to Next.js using version 0.0.7+
migrate
command performs full project migrations and requires authentication and credits. For free single file conversions, use the convert
command.package.json
file with React and React Router dependencies.Examples:./my-react-app
/path/to/react-project
../frontend
./my-next-app
/path/to/next-project
../next-frontend
npm install
in the target directory after migration.router
- React Router to Next.js navigationhelmet
- React Helmet to Next.js Headclient
- Auto-detect and add ‘use client’ directivecontext
- React Context provider migrationall
- Apply all transformations (default)--transform router,client
--transform all
-t helmet,context
Project Analysis
File Structure Creation
Code Transformation
Configuration Setup
migrate
subcommand vs direct command in v0.0.6--transform
optionFeature | v0.0.6 | v0.0.7+ |
---|---|---|
Command | next-lovable <source> | next-lovable migrate <source> |
Free tier | ❌ No | ✅ Single file conversions |
Transformations | All or nothing | Granular control |
Error recovery | Limited | Enhanced |
Dry run detail | Basic | Comprehensive |
Authentication Issues
next-lovable auth
Source Project Not Recognized
Target Directory Issues
Migration Stalls or Fails
--dry-run
to identify potential issues firstSyntax Errors in Source
Credit Consumption High
--dry-run
to estimate credits firstGenerated App Won't Start
npm run dev
fails in migrated projectSolutions:npm install
to ensure all dependenciesrm -rf .next
Routing Issues
href
instead of to
TypeScript Errors
@types/react
, @types/node
--dry-run
to preview all changes and estimate creditsPre-Migration
next-lovable auth
next-lovable migrate ./app --dry-run
During Migration
Post-Migration
npm install
npm run dev
npm run build
Test Your Migrated App
Optimize Performance
Deploy
Monitor & Iterate