@parcel/transformer-typescript-types: Debug Failure. Unhandled SyntaxKind: ImportClause.
See original GitHub issue๐ Configuration
package.json
{
"source": "source/index.ts",
"types": "dist/index.d.ts",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"dependencies": {
"@swc/helpers": "^0.4.11",
"class-validator": "^0.13.2",
"koajax": "^0.8.1",
"reflect-metadata": "^0.1.13",
"regenerator-runtime": "^0.13.9",
"web-utility": "^3.9.2"
},
"peerDependencies": {
"mobx": ">=4 <6"
},
"devDependencies": {
"@parcel/packager-ts": "^2.7.0",
"@parcel/transformer-typescript-types": "^2.7.0",
"@types/node": "^14.18.26",
"dotenv": "^16.0.1",
"mobx": "^5.15.7",
"parcel": "^2.7.0",
"typescript": "~4.8.2"
},
"browserslist": "> 0.5%, last 2 versions, not dead, IE 11",
"targets": {
"main": {
"optimize": true
}
},
"scripts": {
"build": "rm -rf dist/ docs/ && parcel build"
}
}
tsconfig.json
{
"compilerOptions": {
"target": "ES5",
"module": "ES6",
"moduleResolution": "Node",
"esModuleInterop": true,
"downlevelIteration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"skipLibCheck": true,
"lib": ["ES2022", "DOM", "DOM.Iterable"]
},
"include": ["source/*"]
}
๐ค Expected Behavior
Build TS libraries with typescript@^4.8.0 successfully.
๐ฏ Current Behavior
Throw an error with typescript@4.8.2:
@parcel/transformer-typescript-types: Debug Failure. Unhandled SyntaxKind: ImportClause.
but succeed with typescript@^4.7.0.
๐ Possible Solution
Support ImportClause Syntax Kind.
๐ป Code Sample
idea2app/MobX-RESTful#6
๐ Your Environment
| Software | Version(s) |
|---|---|
| Parcel | 2.7.0 |
| Node | 14.19.1 |
| PNPM | 7.9.5 |
| Operating System | Windows 10 Pro 21H2 |
Issue Analytics
- State:
- Created a year ago
- Reactions:9
- Comments:18 (2 by maintainers)
Top Results From Across the Web
TS 4.8 Unhandled SyntaxKind: ImportClause - Stack Overflow
Apart from that this is the error info, I cannot track the file name where the issue is being raised, is there any...
Read more >TypeScript Compiler fails with "Debug Failure. False ...
Open test.ts from the attached project. TypeScript Service and Compiler should be enabled. No errors are highlighted, Console contains the next error:
Read more >ng build --prod error after updating to 17.1.50 | Angular
ng build --prod error after updating to 17.1.50 ... I get the following error on production build after update ... Error: Debug Failure....
Read more >typescript fails to start with "Error: Debug Failure. False ...
I followed the insturctionon and I have failed at 'npm start' with the error, "Error: Debug Failure. False expression."
Read more >angular/angular-cli - Gitter
ERROR in ./src/app/app.module.ts Module build failed: Error: Debug Failure. False expression: Declaration file is not present only for javascript files atย ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Using the
package-lock.jsonoryarn.lockto pin a dependency version is abusive and dangerous. An acceptable workaround is to useyarns โresolutionsโ field. For example in your (root when using workspaces)package.jsonfile:@levino I think thereโre Interface Breaking Changes between TS 4.7 and 4.8, which needs Parcel to adapt.