TypeScript error - Cannot find module '../i18n/locale'

I am using (from package.json):

and getting this error:

TypeScript error in C:/Projects/XXXXXXXXXX/node_modules/@mobiscroll/react/dist/src/core/locale.d.ts(37,28):
[react-scripts] Cannot find module '../i18n/locale'.  TS2307
[react-scripts]     35 | import localeVi from '../i18n/vi';
[react-scripts]     36 | import localeZh from '../i18n/zh';
[react-scripts]   > 37 | import { MbscLocale } from '../i18n/locale';
[react-scripts]        |                            ^
[react-scripts]     38 | declare const localeEn: MbscLocale;
[react-scripts]     39 | declare const locale: {
[react-scripts]     40 |     [key: string]: MbscLocale;

I can confirm I do not see that folder in my i18n folder:

Not sure if I have a bad distro or my install went awry.
Thank you… -Paul

Hi Paul,

I just checked and it looks like the MbscLocale type is not exported on our side in the latest version of Mobiscroll and that is causing the error for you. Until it is fixed in the product you can use any instead of the MbscLocale or the following type definition:

interface MbscLocale {
// Core
setText?: string;
cancelText?: string;
closeText?: string;
clearText?: string;
rtl?: boolean;
selectedText?: string;
selectedPluralText?: string;
// Datetime component
// calendarSystem?: MbscCalendarSystem;
dateFormat?: string;
dateFormatLong?: string;
dateWheelFormat?: string;
dayNames?: string[];
dayNamesShort?: string[];
dayNamesMin?: string[];
daySuffix?: string;
monthNames?: string[];
monthNamesShort?: string[];
monthSuffix?: string;
timeFormat?: string;
timeWheels?: string;
yearSuffix?: string;
nowText?: string;
pmText?: string;
amText?: string;
todayText?: string;
// Calendar component
firstDay?: number;
dateText?: string;
timeText?: string;
allDayText?: string;
noEventsText?: string;
eventText?: string;
eventsText?: string;
moreEventsText?: string;
moreEventsPluralText?: string;
nextMonthText?: string;
nextYearText?: string;
prevMonthText?: string;
prevYearText?: string;
// Daterange component
rangeStartLabel?: string;
rangeEndLabel?: string;
rangeStartHelp?: string;
rangeEndHelp?: string;

Let me know if this helps!

Yes, this works and my app is compiling again. Thank you!