-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Newly initialized react native project has flow errors #11655
Comments
Same Error: |
Having the same issue! |
Same class of issue here, flow keeps reporting errors in files under
|
+1 |
flow: 0.37.4, react: 15.4.2, react-native: 0.41.2 Flow has been completely broken for me since around RN 0.39.0. Not only do I get lots of errors stemming from |
Hmm, I can't repro - can anyone else still repro on the latest everything?
|
This should get fixed by #12533 (or at least won't get broken again when the next version is released...) |
I started the process again and am still having issues. This is on a new-newly initialized project:
|
@drewwyatt Can you specify your RN version, flow version and post your |
I'm having issues using numerous flow versions with RN as well. Hundreds of errors in I will probably just rely on PropTypes for similar effect in the meantime, but it's pretty bad practice to even mention a tool like Flow (see https://facebook.github.io/react/docs/typechecking-with-proptypes.html) when there are so many errors out of the box in the core project and no clear way to circumvent them. This is not the first ticket of this nature and past tickets have even claimed that upgrading to RN 0.42 will fix the issue, but I have not found that to be true as I am on 0.42 and have tried several things including using the .flowconfig in the RN project itself and the Flow version listed therein. Perhaps I'm misunderstanding something about Flow, but if not, please either treat this issue more seriously (maybe add a flow run to your CI?) or stop promoting Flow until your own project passes or at least suppresses your own errors. This has been a waste of time for everyone who has come across the string of tickets raising this issue. |
I was having the same problem. But then I realised that on a fresh react-native install, the .flowconfig file stated a specific version at the end of the file (in my case ^0.38.0). So then I installed flow-bin with that same version. Previously I was trying the oposite direction (install latest flow-bin version and then updating that version on the .flowconfig file). |
If you use brew... I install flow via brew on macOS and it's not possible to pick the version you want to install. If you upgraded your flow version but still have the older one installed you can switch back to it via something like I've created a brew tap for those who still need version 0.38.0. To install it:
|
It seems like react-native should target a specific flow version rather than a |
I had the same problem using [email protected]. Rolling back to 0.38 solved the issue. |
@Kureev, it solved the issue for me too. |
@mediaxtend thanks! If it works, then we need to update our UPD: I tried your solution, but it doesn't seem to work 😞
|
Facing the same issue. Anyone resolved it ? |
RN 0.43.3 now support [email protected].
|
Same issue. I resolved it by going back to 0.40 and adding |
i also getting this problem because i have in folder up node_modules when i remove node_modules it pass |
Still applies $ react-native -v
react-native-cli: 2.0.1
$ react-native init RNApp
<...>
$ cd RNApp
$ cat .flowconfig
<...>
[version]
^0.42.0
$yarn add [email protected]
$ yarn flow
<...>
Found 18 errors
$react-native -V
0.44.2 |
I suppose that template should be kept in sync with actual flowconfig. Alternatively, RN community could maintain libdefs on flow-typed repo, and the generator could install a libdef, based on RN and flow versions. |
Is this solved? I tried the solutions mentioned above, but I still have 145 errors, related to react_native/Libraries files
|
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
Still having this issue after creating new project with
Updated the .flowconfig to use the correct flow version I have installed. Running
|
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> There are some errors I noticed after upgrading my flow version. I had them in my project, and they were also reported in #11655. These errors were ignored on master, but I went through and fixed them so the static analysis will work still. After these changes, I receive no errors using flow `0.60.1` on latest master, or using `0.59` in my local project (which does not have the requisite ignores included). - init a new project `react-native init --version <path-to-repo> helloworld` - add the flow binary `yarn add -D flow-bin` - run flow `yarn flow` - make sure there are no errors in the project. ``` No errors! ✨ Done in 23.60s. ``` <!-- Help reviewers and the release process by writing your own release notes **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [-{Component}-] [ INTERNAL ] [ ENHANCEMENT ] [ {File} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| [CATEGORY] [TYPE] [LOCATION] - MESSAGE EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> [GENERAL][BUGFIX][./Libraries] - Fix up some flow definitions Closes #17086 Differential Revision: D6509112 Pulled By: hramos fbshipit-source-id: a61145b5306c666ab6510ccb9eea02d96f3decb3
Description
The long and short of it is, I'm getting flow errors on brand new projects created with the react native cli (version 2.0.1). Do I have a weird version mismatch or something?
Reproduction
Solution
Right now I'm just not using flow and ignoring the issues. I've tried switching some versions around but keep coming up empty handed.
Additional Information
The text was updated successfully, but these errors were encountered: