Open superandrew opened 4 years ago
Hi, I configured the package which is working when launching expo normally with expo r.
expo r
However when I try to launch the application using vs code debugger I catch this error because the main variable seems to end up being undefined.
undefined
Am I missing some crucial step or piece of information by expecting this to work?
import { ConfigContext, ExpoConfig } from "@expo/config/build"; import { mergeDeep } from "./utils/objectUtils"; import { TENANCY_NAME } from "react-native-dotenv"; export default ({ config }: ConfigContext): ExpoConfig => { try { let customConfig = require(`./tenant_configs/${TENANCY_NAME}.app.config.json`); if (!customConfig) { customConfig = {}; } return mergeDeep({}, config, customConfig); } catch (e) { console.log(e); throw new Error(`Missing app configuration for tenant ${TENANCY_NAME}`); } };
Result:
OS: darwin x64 Adapter node: v12.8.1 x64 vscode-chrome-debug-core: 6.8.8 Could not debug. Missing app configuration for tenant undefined
Ideas? Am I misusing react-native-dotenv?
This package is deprecated for babel-plugin-dotenv-import
Hi, I configured the package which is working when launching expo normally with
expo r
.However when I try to launch the application using vs code debugger I catch this error because the main variable seems to end up being
undefined
.Am I missing some crucial step or piece of information by expecting this to work?
Result:
Ideas? Am I misusing react-native-dotenv?