Reputation:
Hello I am a beginner in React-native and below is my flowconfig file's version and I get an error with this version
[version]
^0.92.0
Is there a way to fix this error, I was trying to run debug mode in visual code for running react-native projects and to print console.log. So far I am unsuccessful.
PS:- beginner in react-native
Upvotes: 15
Views: 19758
Reputation: 30137
package.json
"devDependencies": {
"flow-bin": "0.130.0"
}
.flowconfig
[version]
^0.130.0
If they match, this error can occur when your node_modules
are out of sync with the version of flow-bin
in your package.json
. This can occur if you've changed branches recently or have have an older version in your node modules.
Try removing and reinstalling like this:
rm -rf node_modules/ && npm i
Upvotes: 8
Reputation: 845
Change [version]
in the .flowconfig
to match the installed version, ^0.95.1
Upvotes: 28
Reputation: 41
Instead of changing the flow version make it a ranged version. For example something like >=0.50.0
or simply remove the version altogether. You can read about that more in the flowconfig docs
I find that changing the flow version every time you face this problem to be a bad approach especially if you work with a team and each team member has a different version installed and they would commit their version into the .flowconfig
file
Upvotes: 2