question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getting error while using '@tensorflow-models/mobilenet' in bare react-native project.

See original GitHub issue

I am getting error while using ‘@tensorflow-models/mobilenet’ in bare react-native project. I am referring this documentation: https://blog.tensorflow.org/2020/02/tensorflowjs-for-react-native-is-here.html my code is as below :

import React, { useEffect } from 'react';
import { View, Text } from 'react-native';
import * as mobilenet from '@tensorflow-models/mobilenet';

export default TensorflowLite = () => {
    const load = async () => {
        try {
            // Load mobilenet.
        const model = await mobilenet.load();
        console.log(model);
        } catch(err) {
            console.log(err);
        }
    }
    useEffect(() => {
        load();
    }, []);
    return <View>
       <Text>This is demo app.</Text>
    </View>
}

The error I am getting is: image

Please let me know How can I fix it. Thanks in advance.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
jinjingforevercommented, Sep 17, 2021

Hi @suneeltechnew, I updated the repo with an additional project generated from react native CLI. I found the problem to be the incompatibility between react-native 0.65.1 and expo-gl 10.4.2. I downgraded react-native to 0.63.2 and it works fine on my Pixel 2. (0.65.1 would crash my phone caused by GL context creation failure).

Please give it a try. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Error: Project with path ':expo-modules-core ...
I have tried updating Expo as well as installing an older version of it instead and I'm still getting the same error. Not...
Read more >
Installation in React Native and bare projects
Learn how to configure development builds for bare React Native projects. The installation steps on this page are only required to add the...
Read more >
react-native-in-app-review - npm
Unexpected error occur may return different error from different user and device check code number to get discovered errors messages that could ...
Read more >
How To Eject From Expo Managed Workflow to Bare? - Pagepro
To start with the managed workflow what developers need to know is ... Why using Expo instead of starting with a plain React...
Read more >
React Native Firebase
Welcome to React Native Firebase! To get started, you must first setup a Firebase project and install the "app" module.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found