Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6581

api calls aren't work properly on react native eas build

$
0
0

After successfully building my React Native app, none of my screens have functional components. For instance, the register and login functions do not elicit any response from the server. Below is an example of my functions and my eas.json file. I have used ts in my code if it matters

{"build": {"production": {"android": {"buildType": "apk"      },"env": {"BASE_URL": "http://my server ip/"      }    }  }}
export const loginUser = async (user: Login) => {  try {    const response = await http.post(`${process.env.BASE_URL}aaa/aaa/Login`, user);    console.log('response: ', response)    return response;  } catch (error) {    console.log(error);  }};

and i have this warning in my build logs:

Running "expo doctor"Running 10 checks on your project...✔ Check Expo config for common issues✔ Check package.json for common issues✔ Check dependencies for packages that should not be installed directly✔ Check for common project setup issues✔ Check npm/ yarn versions✔ Check Expo config (app.json/ app.config.js) schema✔ Check that packages match versions required by installed Expo SDK✔ Check for legacy global CLI installed locally✔ Check that native modules do not use incompatible support packages✖ Check that native modules use compatible support package versions for installed Expo SDKDetailed check results:Expected package @expo/config-plugins@~7.2.2Found invalid:  @expo/config-plugins@5.0.4  (for more info, run: npm why @expo/config-plugins)Expected package @expo/prebuild-config@~6.2.4Found invalid:  @expo/prebuild-config@5.0.7  (for more info, run: npm why @expo/prebuild-config)Advice: Upgrade dependencies that are using the invalid package versions.One or more checks failed, indicating possible issues with the project.Command "expo doctor" failed. npx -y expo-doctor exited with non-zero code: 1

Viewing all articles
Browse latest Browse all 6581

Latest Images

Trending Articles



Latest Images