This is a pretty basic React Native app I am making with Expo CLI. I already have a populated SQL Database called (I know this is a bad name) pythonsqlite.db with a table Users that I am trying to query using react-native-sqlite-storage.
One of my screens has a button with an onPress function that querys the database for all users:
import React, {useState} from 'react';
import { Image, StyleSheet, Text, View, TouchableOpacity, TextInput, Button, Picker } from 'react-native';
import { NavigationContainer, useNavigation, useRoute } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
//import { openDatabase } from "expo-sqlite";
import { openDatabase } from 'react-native-sqlite-storage';
import SQLite from 'react-native-sqlite-storage';
//import * as SQLite from 'expo-sqlite';
//import * as FileSystem from "expo-file-system";
//import {Asset} from "expo-asset";
const CharacterCreateScreen = ({navigation, route}) =>{
return(
<View style={styles2.container}>
<Text>Sad :(</Text>
<TouchableOpacity
onPress={() => dbCall()}
style={{ backgroundColor: 'red', marginRight:30 }}>
<Text>Button</Text>
</TouchableOpacity>
</View>
)
}
function dbCall(){
function errorCB(err) {
console.log("SQL Error: " + err);
}
function successCB() {
console.log("SQL executed fine");
}
function openCB() {
console.log("Database OPENED");
}
var db = SQLite.openDatabase("pythonsqlite.db", "1.0", "Test Database", 200000, openCB, errorCB);
var userQuery = "SELECT * FROM Users";
db.transaction((tx) => {
tx.executeSql(userQuery, [], (error, results) => { //callback function to handle the results
alert("Query Completed.");
//alert(results);
// Get rows with Web SQL Database spec compliance.
var len = results.rows.length;
alert(len);
for (let i = 0; i < len; i++) {
let row = results.rows.item(i);
arr1.push(results.rows.item(i));
alert(`User name: ${row.userName}`);
}
});
}); //alert("Done.");
}
However upon pressing the button I get this error message on my IOS device:

I tried running this command as is stated on this page:
cd ios && pod install && cd ..
I bash I got this error:
bash: cd: ios: No such file or directory
In Windows Powershell:
The token '&&' is not a valid statement separator in this version.
This is where I am stuck. I'm not exactly sure where to go. This is very similar to this question, but it is 3 years old and doesn't seem to be answered. I've been trying to figure this out for a really long time if anyone could help me that would be very appreciated.