Hi there,
I just installed flow but when I run it I found:
```npm run flow
[email protected] flow /Users/danielezurico/Desktop/AwesomeProject
flow
Launching Flow server for /Users/danielezurico/Desktop/AwesomeProject
Spawned flow server (pid=30814)
Logs will go to /private/tmp/flow/zSUserszSdanielezZuricozSDesktopzSAwesomeProject.log
Monitor logs will go to /private/tmp/flow/zSUserszSdanielezZuricozSDesktopzSAwesomeProject.monitor_log
Error โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ node_modules/xdl/build/detach/AndroidShellApp.js.flow:244:1
Unable to determine module type (CommonJS vs ES) if both an export statement and module.exports are used in the same
module!
241โ );
242โ }
243โ
244โ export async function copyInitialShellAppFilesAsync(
245โ androidSrcPath,
246โ shellPath,
247โ isDetached: boolean = false
248โ ) {
249โ const _exponentDirectory = exponentDirectory();
250โ if (_exponentDirectory) {
251โ await spawnAsync(`../../tools-public/generate-dynamic-macros-android.sh`, [], {
252โ pipeToLogger: true,
253โ loggerFields: { buildPhase: 'generating dynamic macros' },
254โ cwd: path.join(_exponentDirectory, 'android', 'app'),
255โ env: {
256โ ...process.env,
257โ JSON_LOGS: '0',
258โ },
:
276โ await copyToShellApp('ReactAndroid');
277โ }
278โ
279โ await copyToShellApp('android.iml');
280โ await copyToShellApp('app');
281โ await copyToShellApp('build.gradle');
282โ await copyToShellApp('gradle');
283โ await copyToShellApp('gradle.properties');
284โ await copyToShellApp('gradlew');
285โ await copyToShellApp('settings.gradle');
286โ await copyToShellApp('maven');
287โ await copyToShellApp('debug.keystore');
288โ await copyToShellApp('run.sh');
289โ await copyToShellApp('detach-scripts');
290โ }
291โ
292โ exports.createAndroidShellAppAsync = async function createAndroidShellAppAsync(args: any) {
293โ let {
Found 1 error
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] flow: flow
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] 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/danielezurico/.npm/_logs/2018-07-09T09_59_30_231Z-debug.log
the project has been created with `create-react-native-app AwesomeProject`.
package.json:
{
"name": "AwesomeProject",
"version": "0.1.0",
"private": true,
"devDependencies": {
"flow-bin": "^0.76.0",
"jest-expo": "~27.0.0",
"react-native-scripts": "1.14.0",
"react-test-renderer": "16.3.1"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest",
"flow": "flow",
"flow-stop": "flow stop"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"expo": "^27.0.1",
"react": "16.3.1",
"react-native": "~0.55.2"
}
}
.flowconfig:
[ignore]
[include]
[libs]
[lints]
[options]
[strict]
```
Environment:
node -v
v8.11.1
OS:
Mac Os High Sierra 10.13.5
Same problem, any solution?
@nbodinripert I think I fixed...I wrote a post... have a look: https://www.dzurico.com/react-native-and-flow/
Thanks a lot, your solution works perfectly!
@nbodinripert a comment on the post is appreciated ;)
the link to the blog post has changed, the new one is https://www.dzurico.com/blog/react-native-and-flow
Most helpful comment
@nbodinripert I think I fixed...I wrote a post... have a look: https://www.dzurico.com/react-native-and-flow/