app.config.js is called more than once

When running expo start it seems, app.config.js is called more than once. Is it something normal?

For me, this causes console.log to write same logs multiple times and the build numbers to be incremented multiple times (possibly to be used in an inconsistent way within the whole expo start process).

In the documents Configuration with app.json / app.config.js - Expo Documentation also uses console.log and running that code also generate multiple logs.

So shall the function within app.config.js be a pure function?

expo diagnostics output:

Expo CLI 3.21.3 environment info:
System:
OS: macOS 10.15.5
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 13.6.0 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
npmPackages:
expo: ^37.0.0 => 37.0.11
react: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
npmGlobalPackages:
expo-cli: 2.2.0

Hey @mehmetkaplan,

Thanks for bringing this to our attention. Would you mind creating a github issue here? Addressing this issue there will be a better course of action than on the forums.

Cheers,
Adam

Sure @adamjnav, thanks for the answer.

Here is the issue I opened:

Please let me know if anything (content, place of the issue, etc) is missing or wrong.

1 Like

Meanwhile as a workaround, I am preparing the app.json file in advance automatically. To do that I wrote a small js code to be manually run through node just before running expo build.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.