Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main module field that could not be resolved #272

Open
NikhilMasurkar opened this issue May 21, 2024 · 0 comments
Open

main module field that could not be resolved #272

NikhilMasurkar opened this issue May 21, 2024 · 0 comments

Comments

@NikhilMasurkar
Copy link

I got this error after upgrading react native 0.74
can you please tell me how can I resolve it

Error: While trying to resolve module react-native-restart from file C:\Project_Repo\App_Frontend\IndigoLearn\App.js, the package C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-restart\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-restart\src\index.tsx. Indeed, none of these files exist:

  • C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-restart\src\index.tsx(.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  • C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\react-native-restart\src\index.tsx\index(.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
    at DependencyGraph.resolveDependency (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\node-haste\DependencyGraph.js:243:17)
    at C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\lib\transformHelpers.js:156:21
    at resolveDependencies (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\DeltaBundler\buildSubgraph.js:42:25)
    at visit (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\DeltaBundler\buildSubgraph.js:83:30)
    at async Promise.all (index 2)
    at async visit (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\DeltaBundler\buildSubgraph.js:92:5)
    at async Promise.all (index 0)
    at async buildSubgraph (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\DeltaBundler\buildSubgraph.js:103:3)
    at async Graph._buildDelta (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\DeltaBundler\Graph.js:157:22)
    at async Graph.initialTraverseDependencies (C:\Project_Repo\App_Frontend\IndigoLearn\node_modules\metro\src\DeltaBundler\Graph.js:140:19)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant