This guide will help you install and run frontend of project locally. Follow the steps below to set up your environment and start the application.
Ensure you have the following installed on your system:
- Node.js (LTS version recommended)
- Download and install it from Node.js official website.
- npm or yarn (npm is included with Node.js installation).
- To check if npm is installed, run:
npm -v
- To install Yarn (optional), run:
npm install -g yarn
- To check if npm is installed, run:
-
Clone the Repository
Clone the repository to your local machine using Git:
git clone <repository-url>
Replace
<repository-url>with the actual URL of the repository. -
Navigate to the Project Directory
Move into the project's directory:
cd <project-folder>
Replace
<project-folder>with the directory name of your cloned project. -
Install Dependencies
Install the required dependencies:
- Using npm:
npm install
- OR using Yarn:
yarn install
- Using npm:
-
Start the Development Server
Start the application in development mode:
- Using npm:
npm run dev
- OR using Yarn:
yarn dev
This command will start a local development server. The application will be available at
http://localhost:9001/. - Using npm:
To create an optimized production build of the application, run:
- Using npm:
npm run build
- OR using Yarn:
yarn build
This will generate a dist directory containing the production-ready files.
To preview the production build locally:
- Using npm:
npm run preview
- OR using Yarn:
yarn preview
Here are some additional scripts you can run:
- Lint the Code:
OR
npm run lint
yarn lint
If you encounter issues during installation or setup, consider the following steps:
- Ensure you have the latest version of Node.js and npm/yarn installed.
- Delete the
node_modulesfolder and reinstall dependencies:ORrm -rf node_modules npm install
rm -rf node_modules yarn install
- Clear npm/yarn cache:
- For npm:
npm cache clean --force
- For Yarn:
yarn cache clean
- For npm: