😄How to create-next-app using version 12 instead of latest version (ok)

https://stackoverflow.com/questions/75470624/how-to-create-next-app-using-version-12-instead-of-latest-version

npx create-next-app@12.3.4 next12 --typescript --tailwind

18

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

Last updated

Was this helpful?