First run the following command to check bun is installed or not
bun -vIf you don't have bun installed then run the following command to install bun
curl https://bun.sh/install | bashNow run the following command to create a next app
bun create next [your-app-name]It will create a new directory with the name of your app. To start the app run the following command
cd your-app-name
bun devWe have to update next.js version before we build our next app
bun a next@latestHere we update to the latest version of next for avoiding any kind of build issue
We can add the following scripts to our package.json file
{
"scripts": {
"start": "next start",
"build": "next build"
}
}And we can run the following command to build the production bundle
bun run buildTo run the production build you can fire following command
bun start