s-yadav / react-number-format

React component to format numbers in an input or as a text.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting error when building.

thanveeralisayed opened this issue · comments

My project uses typescript. I have installed the library to my project.

I have imported it using the statement

import { NumericFormat } from "react-number-format";

And I am getting some errors and failing to build.

my webpack version is 5.88.2.

I am attaching the error list in the image.

image

It could be related to some custom webpack configuration on your project. can you check.

@s-yadav I don't think it's caused by webpack config. I use react-number-format in many apps in monorepo. I have updated react-number-format to the last version in one of them a few days ago and everything was building well, but with another app have the same problem: PatternFormat is not exported from 'react-number-format'.

@thanveeralisayed any progress?

The issue was fixed by using an older version of the library. I think final 4.x.x version. The issue happened because my project uses an older typescript version.