Skip to content
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

[🐛] Bug Report Title - Using app.config.js instead of app.json #337

Closed
1 task
rafakwolf opened this issue Mar 1, 2023 · 3 comments
Closed
1 task
Labels
help wanted Extra attention is needed stale

Comments

@rafakwolf
Copy link

What happened?

I looks like using a JS file for the configs instead of app.json won't work.

I understand that are only a few reasons to use a JS file on the configurations, but here's one:

https://dev.to/alexcoding42/how-to-set-environment-variables-with-easexpo-and-react-native-3b2n

In that case I just desire to load environment variables using the expo solution + dotenv.

Platforms

Only on Android

React Native Info

EAS CLI 3.7.2 environment info:
    System:
      OS: Linux 6.1 Pop!_OS 22.04 LTS
      Shell: 5.8.1 - /usr/bin/zsh
    Binaries:
      Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
      Yarn: 1.22.19 - ~/.yarn/bin/yarn
      npm: 9.4.2 - ~/.nvm/versions/node/v16.19.0/bin/npm
    Utilities:
      Git: 2.34.1 - /usr/bin/git
    npmGlobalPackages:
      eas-cli: 3.7.2
      expo-cli: 6.3.2
    Project workflow: generic

react-native version is 0.70.5

Are your using Typescript?

  • My project is using Typescript

package.json

{
  "name": "preco-teto-acoes",
  "version": "1.8.3",
  "main": "index.js",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web",
    "dev": "expo r -c",
    "adb-logs": "$(which adb) logcat",
    "build-prod": "eas build --platform android --profile production --local",
    "build-dev": "eas build --platform android --profile development --local",
    "test": "jest"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-google-signin/google-signin": "^9.0.2",
    "@react-navigation/drawer": "^6.5.7",
    "@react-navigation/native": "^6.1.2",
    "@react-navigation/native-stack": "^6.9.11",
    "expo": "~47.0.12",
    "expo-background-fetch": "~11.0.1",
    "expo-constants": "~14.0.2",
    "expo-device": "~5.0.0",
    "expo-linear-gradient": "~12.0.1",
    "expo-notifications": "~0.17.0",
    "expo-splash-screen": "~0.17.5",
    "expo-sqlite": "~11.0.0",
    "expo-status-bar": "~1.4.2",
    "expo-system-ui": "~2.0.1",
    "expo-task-manager": "~11.0.1",
    "expo-updates": "~0.15.6",
    "moti": "0.23.6",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-native": "0.70.5",
    "react-native-adapty": "1.4.1",
    "react-native-dotenv": "^3.4.8",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-google-mobile-ads": "9.1.1",
    "react-native-progress": "^5.0.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "3.18.2",
    "react-native-svg": "13.4.0",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "^0.18.12",
    "rollbar-react-native": "^0.9.3",
    "valtio": "^1.10.3"
  },
  "devDependencies": {
    "@babel/core": "^7.19.3",
    "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
    "@expo/webpack-config": "^0.17.4",
    "@jest/globals": "^29.3.1",
    "@types/react": "~18.0.24",
    "jest": "^29.3.1"
  },
  "private": true
}

app.json

{
  "expo": {
    "name": "",
    "description": "",
    "slug": "",
    "scheme": "",
    "version": "1.8.3",
    "icon": "./src/assets/icon.png",
    "assetBundlePatterns": [
      "**/*"
    ],
    "android": {
      "versionCode": 108030,
      "permissions": [
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE",
        "INTERNET",
        "RECEIVE_BOOT_COMPLETED",
        "WAKE_LOCK",
        "BILLING"
      ],
      "package": "com.xxx"
    },
    "ios": {
      "bundleIdentifier": "com.xxx"
    },
    "extra": {
      "eas": {
        "projectId": ""
      }
    },
    "userInterfaceStyle": "automatic",
    "runtimeVersion": "1.0.0",
    "updates": {
      "url": ""
    },
    "plugins": [
      "@react-native-google-signin/google-signin"
    ]
  },
  "react-native-google-mobile-ads": {
    "android_app_id": "",
    "ios_app_id": ""
  }
}

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

@rafakwolf rafakwolf added the help wanted Extra attention is needed label Mar 1, 2023
@dylancom
Copy link
Collaborator

dylancom commented Mar 2, 2023

Feel free to submit a PR to support your edge case.

@github-actions
Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 30, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2023
@dylancom
Copy link
Collaborator

dylancom commented Jan 9, 2024

Fixed by #517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed stale
Projects
None yet
Development

No branches or pull requests

2 participants