Skip to content

Module not found: Can't resolve 'react-date-object/calendars/persian' with pnpm in earlier versions #344

@behzad-ahmadi

Description

@behzad-ahmadi

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  `react-date-object@2.1.9` 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions