I'm new to Flow. I just started using Nuclide and Flow. I want to use it with React Native.
TLDR: When I try to run npm run flow
I get the following errors:
... 47 more errors (only 50 out of 97 errors displayed)
To see all errors, re-run Flow with --show-all-errors
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! albums@0.0.1 flow: `flow`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the albums@0.0.1 flow script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jan/.npm/_logs/2018-06-25T20_02_13_257Z-debug.log
Here is what I did step by step:
- I started a new react native app using
react-native init albums
and switched to in the new folder (cd albums
). Next I ran (according to the flow guide)
npm install --save-dev babel-cli babel-preset-flow
, which gave me the following output:npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
- babel-cli@6.26.0
- babel-preset-flow@6.23.0
added 22 packages from 16 contributors in 7.711s
[!] 2 vulnerabilities found [71756 packages audited]
Severity: 1 Low | 1 High
Run
npm audit
for more detail
I then ran
npm install --save-dev flow-bin
.Then I ran
npm run flow init
. This gives the error:npm ERR! missing script: flow
, so I add"flow": "flow"
to my scripts and runnpm run flow init
again getting the error:Error: "/Users/jan/Dev/react-native/albums/.flowconfig" already exists!
.So I run
npm run flow
. This throws the error:Launching Flow server for /Users/jan/Dev/react-native/albums Wrong version of Flow. The config specifies version ^0.67.0 but this is version 0.75.0 Could not start Flow server! npm ERR! code ELIFECYCLE npm ERR! errno 78 npm ERR! albums@0.0.1 flow:
flow
npm ERR! Exit status 78 npm ERR! npm ERR! Failed at the albums@0.0.1 flow script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /Users/jan/.npm/_logs/2018-06-25T20_11_22_239Z-debug.log
- After some googling I found out that I have to delete my
.flowconfig and run
npm run flow init again, which is what I did. This is successful, so I run
npm run flow`. Now I get the error:
... 47 more errors (only 50 out of 97 errors displayed) To see all errors, re-run Flow with --show-all-errors npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! albums@0.0.1 flow:
flow
npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the albums@0.0.1 flow script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! /Users/jan/.npm/_logs/2018-06-25T20_15_18_952Z-debug.log
- After some googling I found out that I have to delete my
This is where I'm stuck now, and I can't get this to work.