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

fix: cannot resolve use-latest-callback #11696

Conversation

henry-infevo
Copy link
Contributor

upgrade version of use-latest-callback which contains the fix issue not able to locate the main file

Please provide enough information so that others can review your pull request.

Motivation

I encounter the issue below after install latest version of @react-navigation/core and it is the same with this issue #11690

@satya164 already fixed the issue in this pr:
satya164/use-latest-callback#5

iOS Bundling failed 1448ms
Unable to resolve "use-latest-callback" from "node_modules/@react-navigation/core/src/PreventRemoveProvider.tsx"
Metro has encountered an error: While trying to resolve module `use-latest-callback` from file `../node_modules/@react-navigation/core/src/PreventRemoveProvider.tsx`, the package `../node_modules/@react-navigation/core/node_modules/use-latest-callback/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`../node_modules/@react-navigation/core/node_modules/use-latest-callback/lib/index.js`. Indeed, none of these files exist:

  * ../node_modules/@react-navigation/core/node_modules/use-latest-callback/lib/index.js(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs)
  * ../node_modules/@react-navigation/core/node_modules/use-latest-callback/lib/index.js/index(.native|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx|.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.cjs|.native.cjs|.cjs): ../node_modules/metro/src/node-haste/DependencyGraph.js (289:17)

Test plan

  • I ran typecheck, lint and e2s test

upgrade version of use-latest-callback which contains the fix
to locate the main in correct location

react-navigation#11690
satya164/use-latest-callback#5
Copy link

Hey @jkaveri! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7d109cf) 75.76% compared to head (0becc66) 76.02%.
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11696      +/-   ##
==========================================
+ Coverage   75.76%   76.02%   +0.25%     
==========================================
  Files         208      207       -1     
  Lines        5976     5944      -32     
  Branches     2321     2306      -15     
==========================================
- Hits         4528     4519       -9     
+ Misses       1398     1375      -23     
  Partials       50       50              
Files Coverage Δ
packages/stack/src/views/Stack/Card.tsx 61.79% <ø> (-0.64%) ⬇️
packages/stack/src/views/Stack/CardContainer.tsx 70.73% <ø> (ø)
packages/stack/src/views/Stack/CardStack.tsx 84.51% <100.00%> (+1.32%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

netlify bot commented Nov 11, 2023

Deploy Preview for react-navigation-example ready!

Name Link
🔨 Latest commit 0becc66
🔍 Latest deploy log https://app.netlify.com/sites/react-navigation-example/deploys/654ef281eee9dc000826e02b
😎 Deploy Preview https://deploy-preview-11696--react-navigation-example.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@osdnk osdnk merged commit 361bc6a into react-navigation:main Nov 12, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants