-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
@parcel/transformer-typescript-types: Debug Failure. Unhandled SyntaxKind: ImportClause. #8419
Comments
Is this a problem caused by |
@levino I think there're Interface Breaking Changes between TS 4.7 and 4.8, which needs Parcel to adapt. |
That is an oxymoron. A breaking change would have meant that |
Here are the breaking changes https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#correctness-fixes-and-breaking-changes |
No, Typescript doesn't follow the usual semver rules, every "minor" version can also contain breaking changes, see e.g. microsoft/TypeScript#14116 |
This should then rather be ~4.7 . I suggest to change it.
|
@levino Unfortunately, TypeScript never follows the Semantic Version specification, almost every Iteration version have breaking changes. This is not the first time I met in TypeScript ecosystem... |
Having the same issue when trying to setup a fresh typescript react project, curiously I don't have this problem with an older react typescript project since it uses an "older" packages-lock.json |
Using the "resolutions": {
"typescript": "~4.7"
} |
extra note: Downgrading to TS 4.7 works. But sometimes due to package manager details, the lib still gets TS 4.8 (if it exists on another package in scope). Also, I've noticed that the "auto-installer" was adding the extra packages to the workspace root. Also, Yarn seems to prefer linking 4.8 versions from other packages even if the child package has 4.7. "devDependencies": {
"@parcel/packager-ts": "2.8.0",
"@parcel/transformer-sass": "2.8.0",
"@parcel/transformer-typescript-tsc": "^2.8.0",
"@parcel/transformer-typescript-types": "2.8.0",
"typescript": "4.7", |
Hi @devongovett , could you plz. suggest the solution to this issue. I am using pnpm workspace and TS 4.8.4, also tried the above suggestion and downgraded the TS to 4.7 still got the same issue. |
You need to pin typescript to version 4.7.x using the "resolutions" field in the root |
If I recall I have tried When |
Without a repo to replicate, you can only help yourself. |
Hi, @levino Sorry for the late response, I was unwell. Today, I am back. Thank you for the response! I was trying to migrate our I will look forward to your response. |
Lets continue this conversation in your repo. |
@parcel-bundler
🎛 Configuration
package.json
tsconfig.json
🤔 Expected Behavior
Build TS libraries with
typescript@^4.8.0
successfully.😯 Current Behavior
Throw an error with
typescript@4.8.2
:but succeed with
typescript@^4.7.0
.💁 Possible Solution
Support
ImportClause
Syntax Kind.💻 Code Sample
idea2app/MobX-RESTful#6
🌍 Your Environment
The text was updated successfully, but these errors were encountered: