MIMEText icon indicating copy to clipboard operation
MIMEText copied to clipboard

Types broken since v3.0.25

Open ellisonc opened this issue 11 months ago • 9 comments

When using versions v3.0.25 and greater (tested up to v3.0.27) typescript complains:

Could not find a declaration file for module 'mimetext'. '/<path>/node_modules/mimetext/dist/mimetext.node.es.js' implicitly has an 'any' type.

ellisonc avatar Jan 02 '25 17:01 ellisonc

Working on this issue. In the meantime, try to import it like ... from 'mimetext/node', ... from 'mimetext/browser' and not the ... from 'mimetext'

muratgozel avatar Jan 02 '25 17:01 muratgozel

We've rolled back to a stable version, in the future please mark changes that break imports as more than just a patch version bump.

ellisonc avatar Jan 02 '25 17:01 ellisonc

I am experiencing the same issue with version 3.0.27. I had to force use version 3.0.24.

laurentpellegrino avatar Jan 06 '25 18:01 laurentpellegrino

    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
index.ts:5:35 - error TS2307: Cannot find module 'mimetext/node' or its corresponding type declarations.

5 import { createMimeMessage } from 'mimetext/node';
                                    ~~~~~~~~~~~~~~~

    at createTSError (C:\Users\jekaj\AppData\Local\nvm\v22.13.0\node_modules\ts-node\src\index.ts:859:12)
    at reportTSError (C:\Users\jekaj\AppData\Local\nvm\v22.13.0\node_modules\ts-node\src\index.ts:863:19)
    at getOutput (C:\Users\jekaj\AppData\Local\nvm\v22.13.0\node_modules\ts-node\src\index.ts:1077:36)
    at Object.compile (C:\Users\jekaj\AppData\Local\nvm\v22.13.0\node_modules\ts-node\src\index.ts:1433:41)
    at Module.m._compile (C:\Users\jekaj\AppData\Local\nvm\v22.13.0\node_modules\ts-node\src\index.ts:1617:30)
    at node:internal/modules/cjs/loader:1699:10
    at Object.require.extensions.<computed> [as .ts] (C:\Users\jekaj\AppData\Local\nvm\v22.13.0\node_modules\ts-node\src\index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1313:32)
    at Function._load (node:internal/modules/cjs/loader:1123:12)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
  diagnosticCodes: [ 2307 ]
}

2astm avatar Jan 16 '25 04:01 2astm

Also rolled back to 3.0.24

phalkone avatar Feb 04 '25 21:02 phalkone

We also had to roll back to 3.0.24 because imports using require are broken

paresy avatar Feb 05 '25 10:02 paresy

We had the same issue. 3.0.24 is currently the way to go. Hope it will get fixed soon :)

andreasvh-conceto avatar Feb 14 '25 17:02 andreasvh-conceto

Same issue. Guess the tsconfig or something here broke the types

kkarimi avatar Feb 18 '25 08:02 kkarimi

Hello, We have the same issue upgrading to 3.0.27, downgrading to 3.0.24 resolve the issue.

adrien1251 avatar Feb 27 '25 10:02 adrien1251