Import tfjs-react-native not working on EXPO CLI Project
See original GitHub issueDescribe the problem or feature request
I’m getting this error when I try to run my React-Native program on the web or android. I followed the steps on the tfjs-react-native documentation but I’m still having issues with my program.
TensorFlow.js version
tfjs-react-native
Browser version
package.json
Code to reproduce the bug / link to feature request
This is the code causing the error
I even removed the tfjs-react native import and it compiles so I don’t know what to do
If you would like to get help from the community, we encourage using Stack Overflow and the tensorflow.js
tag.
GitHub issues for this repository are tracked in the tfjs union repository.
Please file your issue there, following the guidance in that issue template.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:19 (9 by maintainers)
Top Results From Across the Web
tfjs-react-native-expo-fix - npm
Step 1. Create your react native app. ... You can use the React Native CLI or Expo. This library relies on a couple...
Read more >REACT NATIVE - Can't install Realm Sync - Expo version 44
Problem : We have installed Expo version 44 (because a later or earlier version of Expo does not match with realm), but can...
Read more >Setup Tensorflow.js to React Native Expo project
import React from 'react' import { Text, View } from 'react-native' import * as tf from '@tensorflow/tfjs' class App extends React.
Read more >null is not an object (evaluating 'rnfsmanager.rnfsfiletyperegular')
Solution for android is react-native link react-native-fs then react-native run-android to re-run the app. Open side panel.
Read more >Experimenting with TensorFlow.js - Tao
yarn add global expo-cli # Creates a bare bones React Native ... as tf from "@tensorflow/tfjs"; import "@tensorflow/tfjs-react-native"; ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That
compiled_api.ts
file will be removed from the dist directory in the next tfjs release (with https://github.com/tensorflow/tfjs/commit/fb163f7f1f8cbb953a856f1621d8b1bad44afd04) as it shouldn’t even be there. For a quick fix, just delete that typescript file:rm -f node_modules/@tensorflow/tfjs-converter/dist/src/data/compiled_api.ts
Then metro should stop complaining.
Doesn’t seem like fetch supports local afaik. Might have to use expo-file-system to load local images for now.
@motya770 Which error are you getting? I have a barebones TF.js typescript expo managed project that can load fine for me (https://github.com/pvaneck/tfjs-react-native-app) if you want to check that out.