Skip to content

[iOS] error: bundling failed: Error: Unable to resolve module ./build/index #4

Open
@esutton

Description

@esutton

Has anyone succeeded to get this TypeORM example working on either iOS or Android?

I would love to find an ORM to replace Realm JS.

git clone https://github.com/typeorm/react-native-example.git
cd react-native-example
yarn
react-native run-ios

Results in red box error:

image

I cannot get Android to even get this far.

react-native run-android
Scanning folders for symlinks in /Users/jdoe/Documents/projects/react-native/typeorm_react-native-example/node_modules (20ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
Looking for JS files in
   /Users/edward3/Documents/projects/react-native/typeorm_react-native-example 


Metro Bundler ready.

Loading dependency graph, done.
error: bundling failed: Error: Unable to resolve module `./build/index` from `/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/index.js`: The module `./build/index` could not be found from `/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/index.js`. Indeed, none of these files exist:

  * `/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/build/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
  * `/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/build/index/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)`
    at ModuleResolver.resolveDependency (/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:158:865)
    at ResolutionRequest.resolveDependency (/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:92:16)
    at DependencyGraph.resolveDependency (/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/node-haste/DependencyGraph.js:271:4465)
    at dependencies.map.relativePath (/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:379:19)
    at Array.map (<anonymous>)
    at resolveDependencies (/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:378:16)
    at /Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:203:33
    at Generator.next (<anonymous>)
    at step (/Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:296:307)
    at /Users/edward3/Documents/projects/react-native/typeorm_react-native-example/node_modules/metro/src/DeltaBundler/traverseDependencies.js:296:467
 BUNDLE  [ios, dev] ./index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1), failed.

Tips and suggestion are much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions