react-multi-date-picker
react-multi-date-picker copied to clipboard
Module not found: Can't resolve 'react-date-object/calendars/persian' with pnpm in earlier versions
When using react-date-object in a Next.js project managed with pnpm, I encountered the following error during runtime or build:
Module not found: Can't resolve 'react-date-object/calendars/persian'
Install `[email protected]` resolved the issue, but I’m reporting this to highlight potential compatibility issues with `pnpm` in older versions or to request better documentation for `pnpm` setups.
The error only appeared during runtime/build, and my IDE (WebStorm) showed no issues during development. The same code worked fine in a similar project using `npm`.
## Steps to Reproduce
1. Create a Next.js project with `pnpm` as the package manager (`pnpm create next-app`).
2. Install an earlier version of `react-multi-date-picker` (e.g., `pnpm i react-multi-date-picker`).
3. Import the Persian calendar in a file:
import { DateObject } from 'react-multi-date-picker';
import persian from 'react-date-object/calendars/persian';
new DateObject().convert(persian).year