-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
React--Native: Metro has encounter an error: While trying to resolve module #9119
Comments
Same error! |
Workaround until fix : Add cjs extension in metro.config.js module.exports = (() => {
return {
resolver: {
sourceExts: ['cjs'],
},
}
})() |
Yeah, found this in changelog. |
This comment has been minimized.
This comment has been minimized.
Thanks All: const {getDefaultConfig} = require('metro-config'); |
Metro has encountered an error: While trying to resolve module
@apollo/client
from file/Users/admin/Documents/MySelf/Projects/React-Native/Latest/MyProj/index.js
, the package/Users/admin/Documents/MySelf/Projects/React-Native/Latest/MyProf/node_modules/@apollo/client/package.json
was successfully found. However, this package itself specifies amain
module field that could not be resolved (/Users/admin/Documents/MySelf/Projects/React-Native/Latest/MyProf/node_modules/@apollo/client/main.cjs
. Indeed, none of these files exist:RCTFatal
__28-[RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start
The text was updated successfully, but these errors were encountered: