-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with newer TypeScript versions #34
Comments
I have the same issue. I was able to temporarily fix it by adding this in my "overrides": {
"cjstoesm": {
"typescript": "3.9.10"
}
} |
Thanks, we'll need to downgrade our Typescript dependency then I guess. |
Works with Typescript 4.9.5. |
|
For users of pnpm, in package.json:
|
Same here :( 33614@LAPTOP-9FSG2200 MINGW64 /c/git/njre (main)
$ cjstoesm --import-assertions false **/*.*
C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:119075
Debug.fail(`Unhandled SyntaxKind: ${Debug.formatSyntaxKind(node.kind)}.`);
^
Error: Debug Failure. Unhandled SyntaxKind: ImportClause.
at pipelineEmitWithHintWorker (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:119075:11)
at pipelineEmitWithHint (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:118634:7)
at pipelineEmitWithComments (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:122279:5)
at pipelineEmit (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:118583:5)
at emitExpression (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:118567:5)
at emitImportDeclaration (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:120520:5)
at pipelineEmitWithHintWorker (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:118831:18)
at pipelineEmitWithHint (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:118634:7)
at pipelineEmitWithComments (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:122279:5)
at pipelineEmit (C:\Users\33614\AppData\Roaming\npm\node_modules\cjstoesm\node_modules\typescript\lib\typescript.js:118583:5)
Node.js v18.18.2
33614@LAPTOP-9FSG2200 MINGW64 /c/git/njre (main)
$ tsc -v
Version 5.2.2 |
I've found success with this package by @ph-fritsche.
|
This worked for me : |
Hi everyone. With v3.0.0, |
Description
cjstoesm doesn't seem to work with TypeScript 5. Since TypeScript is a peer dependency, I don't think there is a way to provide cjstoesm with the right version, if a newer TypeScript is installed in the parent project. This workaround: #33 (comment) only works if it is not installed.
Expected Behavior
cjstoesm should work with projects that are using TypeScript 5.
Actual Behavior
The text was updated successfully, but these errors were encountered: