Tfjs: [tfjs-react-native] Fail to run integration_rn59

Created on 14 Feb 2020  路  3Comments  路  Source: tensorflow/tfjs

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version

1.5.1

tfjs-react-native version

0.2.0

Describe the problem or feature request

When I tried to run tfjs/tfjs-react-native/integration_rn59, I got this error

Loading dependency graph, done.
 DELTA  [android, dev] ./index.js 鈻撯枔鈻撯枔鈻戔枒鈻戔枒鈻戔枒鈻戔枒鈻戔枒鈻戔枒 27.5% (176/501)::ffff:127.0.0.1 - - [14/Feb/2020:09:01:16 +0000] "GET /index.delta?platform=android&dev=true&minify=false HTTP/1.1" 500 - "-" "okhttp/3.12.1"
error: bundling failed: Error: Unable to resolve module `./async_storage_io_test` from `/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/@tensorflow/tfjs-react-native/dist/tests.js`: The module `./async_storage_io_test` could not be found from `/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/@tensorflow/tfjs-react-native/dist/tests.js`. Indeed, none of these files exist:
  * `/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/@tensorflow/tfjs-react-native/dist/async_storage_io_test(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.jsx|.native.jsx|.jsx)`
  * `/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/@tensorflow/tfjs-react-native/dist/async_storage_io_test/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.jsx|.native.jsx|.jsx)`
    at ModuleResolver.resolveDependency (/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)
    at ResolutionRequest.resolveDependency (/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/node-haste/DependencyGraph.js:283:16)
    at Object.resolve (/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/lib/transformHelpers.js:261:42)
    at dependencies.map.result (/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/DeltaBundler/traverseDependencies.js:399:31)
    at Array.map (<anonymous>)
    at resolveDependencies (/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:18)
    at /media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/DeltaBundler/traverseDependencies.js:269:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/media/ken/Temp/temp_project/tfjs/tfjs-react-native/integration_rn59/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)
 DELTA  [android, dev] ./index.js 鈻撯枔鈻撯枔鈻戔枒鈻戔枒鈻戔枒鈻戔枒鈻戔枒鈻戔枒 27.5% (176/501), failed.

Code to reproduce the bug / link to feature request

$ yarn install
$ react-native start
$ react-native run-android

Can you help me please! Thank you so much!

react-native awaiting response bug

All 3 comments

@KienPM can you please try with latest tfjs and rect-native versions and see if this error occurs ?
and also please provide operating system.
Try to clear the cache using this command: react-native start --reset-cache if that helps.

I also ran into this when running the app for Android. I can confirm that using the latest version of tfjs-react-native got the app working for me. I created a PR to bump the version.

thank you so much for your responses!

Was this page helpful?
0 / 5 - 0 ratings