I am working through various tutorials using React Native that involve setting up the Vision API e.g.:
https://davidl.fr/blog/google-vision-with-react-native
However, I am receiving a "error cannot convert undefined value to object" message when I run the code and upload an image on Expo Go.
Is there a way to tell if I have set up the API correctly or is this error due to the react-native code?
Thanks!
Error caused by the callGoogleVisionAsync
async function callGoogleVisionAsync(image) {
const body = {
requests: [
{
image: {
content: image,
},
features: [
{
type: 'LABEL_DETECTION',
maxResults: 1,
},
],
},
],
};