Thumbnail
Category: Lập trình

Cài nextjs version cũ

Date: June 4, 2024
8 views

It's possible to setup Next.js version 12 manually:

# init the package.json
npm init


# intall next dependencies
npm install next@12.3.4 react react-dom


// edit your package.json with next scripts
"scripts": {
 "dev": "next dev",
 "build": "next build",
 "start": "next start",
 "lint": "next lint"
}

# create the file structure
.
├── package.json
├── pages
│  ├── index.js


// init your index.js
import React from "react";

function index() {
 return <div>Hello world</div>;
}

export default index;

# start next
npm run dev

Tham khảo: https://stackoverflow.com/questions/75470624/how-to-create-next-app-using-version-12-instead-of-version-13



Copyright © 2025 All Right Reserved