Andarist / Andarist/react-textarea-autosize

New tsx 4.20.1 causes: TypeError: Cannot read properties of undefined (reading 'exports')

未關閉
#421 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
2.4k
分支
247
PR 合併指標
30 天內沒有已合併 PR

描述

Please don't skewer me for not understanding all of this. I can't easily provide a sandbox to test like other bug issuers!

To replicate: Install the tsx package 4.20.1 (I upgraded from 4.19.0, so that is the workaround).

Then put the following import in a file. I don't even think any additional code is needed. Just the import (though I am having an issue with hot reloading right now with this tsx while testing).

The new tsx seems to be using Node 24 types and more ESM methodology so I'm wondering if react-textarea-autosize will need an update to work with it.

`import TextareaAutosize from 'react-textarea-autosize';`

Causes:

`TypeError: Cannot read properties of undefined (reading 'exports')`

at require (node:internal/modules/esm/translators:151:33)
at C:\Users\HP\Bloomtri\bloomtri\node_modules\react-textarea-autosize\dist\react-textarea-autosize.development.esm.js:2:1247
at Object. (C:\Users\HP\Bloomtri\bloomtri\node_modules\react-textarea-autosize\dist\react-textarea-autosize.development.esm.js:3:3)
at loadCJSModule (node:internal/modules/esm/translators:165:3)
at ModuleWrap. (node:internal/modules/esm/translators:207:7)
at ModuleJob.run (node:internal/modules/esm/module_job:327:25)
at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:663:26)
at SSRCompatModuleRunner.directRequest (file:///C:/Users/HP/Bloomtri/bloomtri/node_modules/vite/dist/node/module-runner.js:1233:24)
at SSRCompatModuleRunner.cachedRequest (file:///C:/Users/HP/Bloomtri/bloomtri/node_modules/vite/dist/node/module-runner.js:1180:76)
at eval (C:/Users/HP/Bloomtri/bloomtri/app/components/PracticeQuestion.tsx:6:31)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。