Installation
In this part of the documentation we will show you how to install NextMerce.
Before moving forward, make sure you have Node.js installed on your machine. Otherwise the installation commands will not work.
1. Download template and extract it. Then CD into that directory and run this command to install the dependencies:
npm install
# or
yarn installSome included packages causes peer-deps issue with React 19 while installing. With npm the
--legacy-peer-depsflag is a workaround for that at the moment.
2. After completing the installation run this command to start the developement server:
npm run devor
yarn devNext Steps
Once the installation is done,
Follow these steps to complete the installation.
Note: you can use any PostgreSQL you want. Just save the database url in the env using this name:
DATABASE_URL=YOUR_DB_CONNECT_URLFollow the Sanity Integration guide to setup the project. After that take the Sanity ProjectID and title, and save them in the .env file under these variable names:
NEXT_PUBLIC_SANITY_PROJECT_ID=""
NEXT_PUBLIC_SANITY_PROJECT_TITLE=""Deploying to server
After the installation and customization are done you have to deploy the template. Here are the steps you need to follow to deploy the template:
Build the template locally and then deploy it to the server. Build the template using the following command, When you run this command you’ll get a build folder. Now you can upload this folder to your server and your site will be live.
npm run buildor
yarn build