Skip to content
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

Warning from typescript-estree when building TypeScript app #7255

Closed
mshindal opened this issue Jun 20, 2019 · 20 comments
Closed

Warning from typescript-estree when building TypeScript app #7255

mshindal opened this issue Jun 20, 2019 · 20 comments

Comments

@mshindal
Copy link

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

N/A

Environment

Environment:
  OS:  Windows 10
  Node:  10.16.0
  Yarn:  1.16.0
  npm:  6.3.0
  Watchman:  Not Found
  Xcode:  N/A
  Android Studio:  Version  3.4.0.0 AI-183.5429.30.34.5452501

Packages: (wanted => installed)
  react: ^16.8.6 => 16.8.6
  react-dom: ^16.8.6 => 16.8.6
  react-scripts: 3.0.1 => 3.0.1

Steps to Reproduce

  1. yarn create react-app test --typescript
  2. cd test
  3. yarn build

Expected Behavior

A warning should not appear.

Actual Behavior

This warning appears:

WARNING: You are currently running a version of TypeScript which is not officially supported by typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.2.1 <3.5.0

YOUR TYPESCRIPT VERSION: 3.5.2

Please only submit bug reports when using the officially supported version.

This reported already here, and was marked fixed, but it's still happening.

Reproducible Demo

N/A

@mrmckeb
Copy link
Contributor

mrmckeb commented Jun 23, 2019

We've seen this, and @ianschmitz and I were discussing the best approach.

We can a) turn off this error - but that sounds like the wrong approach, or b) pin the installed version of TypeScript on each release, so that it's within the range of that module.

@robertvansteen
Copy link
Contributor

I find the error a bit intrusive. I mean this is where yarn's unmet peer dependency warnings are for right?

@koltyakov
Copy link

Btw, typescript-estree is archived if I don't mismatch something.

So locking TypeScript version in favor of unmaintained module doesn't seem a good idea rather than moving away from using archived modules.

@mrmckeb
Copy link
Contributor

mrmckeb commented Jun 24, 2019

We use https://github.com/typescript-eslint/typescript-eslint - which has typescript-estree as a dependency.

They now manage typescript-estree:
https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/typescript-estree

Keep in mind that we didn't create the error @rovansteen, and it's a default setting... so all we can do is either turn it off, or lock our versions and wait for them to make a release (which I assume would only ever be a few days later).

https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration

@robertvansteen
Copy link
Contributor

I know, was just saying that I don't think a package should just claim the console like that. I would be in favor of disabling the warning, but that would probably give more support for CRA if people encounter errors so locking the TypeScript version would make sense.

@MichaelDeBoey
Copy link
Contributor

@mrmckeb This is fixed since https://github.com/typescript-eslint/typescript-eslint/releases/tag/v1.10.1

@Hinaser
Copy link

Hinaser commented Jul 5, 2019

I could suppress those warnings by adding 3 extra dev dependencies.

  • "@typescript-eslint/eslint-plugin": "^1.11.0",
  • "@typescript-eslint/parser": "^1.11.0",
  • "eslint": "^5.16.0"
yarn add --dev @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint@5.16.0

But we need to remove these extra dependencies in future, so you better subscribe this issue as a reminder.

EDITED
I encountered eslint error when I tried to edit .tsx file with my IDE (WebStorm).
I'm sorry I should have tested carefully by myself before posting.

@piec
Copy link

piec commented Jul 9, 2019

you may use

  "resolutions": {
    "@typescript-eslint/parser": "^1.11.0",
    "@typescript-eslint/eslint-plugin": "^1.11.0"
  }

+ yarn
in your app package.json as a temporary workaround. Not sure everything works 100% but I'm not getting the version warning anymore and typescript-eslint works fine too

@mrmckeb
Copy link
Contributor

mrmckeb commented Jul 15, 2019

We're working on upgrading these in the next version, we're just waiting for this: typescript-eslint/typescript-eslint#644

@MichielCornilleESC
Copy link

We're working on upgrading these in the next version, we're just waiting for this: typescript-eslint/typescript-eslint#644

Seems to be fixed!

@mrmckeb
Copy link
Contributor

mrmckeb commented Jul 28, 2019

This should be fixed in the next release :)

@lookfirst
Copy link
Contributor

ts 3.6.2 and it is back again. =(

@zhaoky
Copy link

zhaoky commented Sep 3, 2019

@lookfirst me too

1 similar comment
@sambecker
Copy link

@lookfirst me too

@lookfirst
Copy link
Contributor

lookfirst commented Sep 4, 2019

Before any more #metoo, please just 👍 my comment, we all don't need more email. ❤️ 🙉

@alibenmessaoud

This comment has been minimized.

@timendez
Copy link

timendez commented Sep 4, 2019

Is there any way to suppress this warning for the time being? I understand it and would like to just keep the logs a little bit quieter :)

@hylarucoder
Copy link

yarn global add typescript@">=3.4.0 <3.6.0" --save-dev --save-exact

@jsyrjala
Copy link

Upgrading typescript to 3.7.2 worked after removing bunch of typescript-estree related deps from yarn.lock so that yarn can fetch newer versions for these deps. No more this warning.

@ianschmitz
Copy link
Contributor

Folks were likely seeing this because we previously had these packages pinned in our dependencies. We unpinned the @typescript/* packages in 3.1.2. Going forward if you encounter this issue when upgrading to a newer version of TypeScript, you likely need to upgrade your @typescript/* packages that are in your lock file (rm -rf node_modules/ yarn.lock && npm i or whatever works for your workflow).

We won't be supressing this warning at this point as it is an indication that you're using an unsupported version of TypeScript that can cause other issues with our tooling (such as linting). The ability to upgrade the @typescript/* packages outside of react-scripts releases will be the way to solve this going forward.

@facebook facebook locked as resolved and limited conversation to collaborators Nov 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests