question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@babel/types 7.12.11 causes syntax error on TypeScript 3.2.4

See original GitHub issue

Bug Report

Current behavior I use babel in a react application. When trying to produce a build (yarn run build), it fails with error code: TypeScript error in /var/jenkins/…/node_modules/@babel/types/lib/index.d.ts(1450,50): ‘{’ or ‘;’ expected. TS1144

      1448 | }): ReturnedChild[];
      1449 | 
    > 1450 | declare function assertNode(node?: any): asserts node is Node;
           |                                                  ^
      1451 | 

As a current fix I declared a yarn resolution to use version 7.12.10, which compiles without any issues.

- Babel version:  v7.12.11
- Node 10.15.3, yarn 1.22.4, typescript 3.2.4
- OS: Windows 10
- How you are using Babel: webpack
- ```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
nicolo-ribaudocommented, Dec 17, 2020

@salvoravida Every time you comment in this repository you do so sarcastically, pretending we owe you something (hint: we do not!). Unless you want to be collaborative, you are not welcome to interact in this repository.

PS. I already recommended you to use lockfiles.

4reactions
AviVahlcommented, Dec 17, 2020

@salvoravida You can avoid your CI breaking by using lock files and not picking up new versions automatically… Lock files are there so we can continue working while addressing any compatibility issues that rise due to new versions. Works well for my team.

I cannot imagine working on a project using ts@3.2 without lock files. It could break at any second due to @types packages already dropping their support. @babel is just the current victim/offender.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular: node_modules/@types/babel _traverse/index.d.ts ...
In my case, the dependency was @types/babel-types. It was compiled with 3.7 typescript version. later I have installed and copied the index.d.ts ...
Read more >
Open Source Used In Assist 3.1 - Cisco
This document contains licenses and notices for open source software used in this product.
Read more >
Open Source Product Listing | Tenfold
@babel/code-frame@7.12.11, MIT, https://github.com/babel/babel ... @babel/plugin-syntax-typescript@7.14.5 ... make-error-cause@1.2.2, Apache-2.0 ...
Read more >
Dependencies | umi_cps | npm - Open Source Insights
arrow_right antd. 3.26.16 Notes Relation Licenses Depende... Version 3.26.16 Published April 26, 2020 Description arrow_right father. 2.30.23 Notes Relation Licenses Depende... Version 2.30.23 Published September 15,...
Read more >
21.07 - Teradici
... 7.12.13 : MIT License @babel/plugin-syntax-typescript 7.12.13 : MIT ... MIT License errno 0.1.8 : MIT License error-stack-parser v2.0.6 : MIT License ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found