To run the NSS-WEBSITE, follow these steps:
- Clone the repository to your local machine.
- Navigate to the project directory:
cd /path/to/project. - Install the required dependencies:
yarn installif Yarn is already installed. - Start the development server:
npm run dev(oryarn run devif Yarn is already installed). - Open your web browser and visit
http://localhost:5173to view the website.
That's it! You should now have the NSS-WEBSITE up and running locally on your machine.
If you don't have Yarn installed on your machine, you can install it using npm by following these steps:
- Check if Yarn is already installed by running the command
yarn --versionin your terminal or command prompt. - If Yarn is not installed, you can install it using npm by running the command
npm install --global yarn. - After installing Yarn, you can proceed with the remaining steps mentioned above to run the NSS-WEBSITE.
That's it! You should now have Yarn installed on your machine and be able to run the NSS-WEBSITE locally.
This project uses date-fns v2.30.0 and includes a compatibility layer for the MUI Date Picker which requires specific imports. If you encounter errors related to date-fns during build or deployment (particularly on Vercel), please refer to the DATE_FNS_FIX_DOCUMENTATION.md file.
The fix includes:
- A custom date-fns adapter in
src/utils/dateFnsAdapter.js - A patch script that runs before build in
scripts/patch-date-fns.js - Custom Vite configuration in
vite.config.js - Vercel-specific build commands in
vercel.json
To use the custom DateFnsAdapter in your components:
import { DatePicker } from "@mui/x-date-pickers/DatePicker";
import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
import { CustomDateFnsAdapter } from "../path/to/utils/dateFnsAdapter";
// Then in your component:
<LocalizationProvider dateAdapter={CustomDateFnsAdapter}>
<DatePicker />
</LocalizationProvider>;