Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Bug with latest version of autosize #152

Open
himynameistimli opened this issue May 17, 2021 · 3 comments
Open

Bug with latest version of autosize #152

himynameistimli opened this issue May 17, 2021 · 3 comments

Comments

@himynameistimli
Copy link

Hi,

An update was added to autosize in version 4.0.3 yesterday that causes an autosize is not a function error when rendering the react-autosize-textarea component.

This didn't occur locally, only in our production builds, but we fixed it by specifying the exact version of autosize (4.0.2) in our package directly.

@denindka
Copy link

It still install 4.0.3. How to fix this ?

@gkumar-mdsol
Copy link

I also started facing the same issue since this morning. I just locked the autosize version to 4.0.2 in my package.json file and it worked.

I just added a preinstall script inside scripts of package.json and locked autosize version to 4.0.2
Make sure resolutions should be outside the scripts

"preinstall": "npx npm-force-resolutions",

"resolutions": {
"autosize": "4.0.2"
}

@angelogiuseppe
Copy link

To anyone experiencing this issue, feel free to try: https://www.npmjs.com/package/force-resolutions

Just change:

"preinstall": "npx npm-force-resolutions"

To:

"preinstall": "npx force-resolutions"

npx force-resolutions does not run when no package-lock.json is detected, and allows the next command inline to be executed as normal. This is useful when installing dependencies for a package that has been already published where package-lock.json is not available.

Feedback and PR's are welcome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants