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.

tfjs-react-native got error [TypeError: undefined is not an object (evaluating 'env().platform.fetch')] with Apple M1 Pro

See original GitHub issue

I run my code on my Apple M1 Pro(yarn ios) , got error

[TypeError: undefined is not an object (evaluating ‘env().platform.fetch’)]

{
  "name": "rntf",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "expo": "expo",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.17.4",
    "@tensorflow-models/mobilenet": "^2.1.0",
    "@tensorflow/tfjs": "^3.17.0",
    "@tensorflow/tfjs-react-native": "^0.8.0",
    "expo": "^45.0.0",
    "expo-camera": "~12.2.0",
    "expo-gl": "~11.3.0",
    "expo-gl-cpp": "~11.3.0",
    "react": "17.0.2",
    "react-native": "0.68.2",
    "react-native-fs": "^2.20.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.32.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.67.0",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}

I had reade this https://github.com/tensorflow/tfjs/issues/3300 , could not fix

I try to run this https://github.com/tensorflow/tfjs-examples/tree/master/react-native/image-classification/react-native-cli but failed

Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11

github_iconTop GitHub Comments

3reactions
darringrovecommented, Jul 7, 2022

@bergkamp How did you resolve this issue? Can you share the working package.json and App.js?

0reactions
google-ml-butler[bot]commented, Jul 7, 2022

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop Results From Across the Web

In react native, on executing posenet.load() getting error ...
TypeError : undefined is not an object (evaluating 'env().platform.fetch'), on calling the posenet.load(). It used to work fine until last week.
Read more >
tf.io.RequestDetails - TensorFlow.js React Native API
tfjs-react-native provides a TensorFlow.js platform adapter for react native. All symbols are named exports from the tfjs-react-native package.
Read more >
undefined is not an object (evaluating 'env().platform.fetch') in ...
TypeError : undefined is not an object (evaluating 'env().platform.fetch') in createDetector using tfjs-react-native with pose-detection.
Read more >
[CLB] Wrathful Red Dragon seem bugged - Magefree/Mage
tfjs-react-native got error [TypeError: undefined is not an object (evaluating 'env().platform.fetch')] with Apple M1 Pro, 11, 2022-05-18, 2022-12-05.
Read more >
@tensorflow/tfjs-react-native - npm
TensorFlow.js platform implementation for React Native. Latest version: 0.8.0, last published: a year ago.
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