Skip to content

[BUG]: Error: Unable to resolve module ./index from C:\work\projects\react-native-boilerplate\MyApp/.: #294

@Praveer-grover

Description

@Praveer-grover

react-native environment setup

  • I verified that I have not react-native-cli installed globally and be up to date about the React Native environment setup.

Description

Was facing an issue with index.example.ts in ./Config, after checking the closed bug. I renamed it to index.ts
But now, facing the following exception on running the app in device:

Error: Unable to resolve module ./index from C:\work\projects\react-native-boilerplate\MyApp/.:

None of these files exist:

  • index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • index\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (C:\work\projects\react-native-boilerplate\MyApp\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:107:15)
    at DependencyGraph.resolveDependency (C:\work\projects\react-native-boilerplate\MyApp\node_modules\metro\src\node-haste\DependencyGraph.js:288:43)
    at C:\work\projects\react-native-boilerplate\MyApp\node_modules\metro\src\lib\transformHelpers.js:129:24
    at Server._resolveRelativePath (C:\work\projects\react-native-boilerplate\MyApp\node_modules\metro\src\Server.js:1072:12)
    at async Server.requestProcessor [as _processBundleRequest] (C:\work\projects\react-native-boilerplate\MyApp\node_modules\metro\src\Server.js:428:37)
    at async Server._processRequest (C:\work\projects\react-native-boilerplate\MyApp\node_modules\metro\src\Server.js:380:9)

Version

latest, ran cmd "npx react-native init MyApp --template @thecodingmachine/react-native-boilerplate" to install

On which OS this issue appear on?

  • IOS
  • Android

Desktop OS

windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions