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

可不可以有个完整的 Demo #1

Open
wenkangzhou opened this issue May 20, 2022 · 4 comments
Open

可不可以有个完整的 Demo #1

wenkangzhou opened this issue May 20, 2022 · 4 comments

Comments

@wenkangzhou
Copy link

No description provided.

@wenkangzhou
Copy link
Author

wenkangzhou commented May 20, 2022

Metro has encountered an error: While trying to resolve module react-native-staggered-list from file /Users/jim/.../src/pages/waterfall2/index.js, the package /Users/jim/.../node_modules/react-native-staggered-list/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/jim/.../node_modules/react-native-staggered-list/index.tsx. Indeed, none of these files exist:

  • /Users/jim/.../node_modules/react-native-staggered-list/index.tsx(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  • /Users/jim/.../node_modules/react-native-staggered-list/index.tsx/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx): /Users/jim/...node_modules/metro/src/node-haste/DependencyGraph.js (311:17)

309 |
310 | if (error instanceof InvalidPackageError) {

311 | throw new PackageResolutionError({
| ^
312 | packageError: error,
313 | originModulePath: from,
314 | targetModuleName: to

RCTFatal
__28-[RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start_sim
0x0
0x0
__dso_handle

@wyrainmonkey
Copy link

我也报同样的错误

@wyrainmonkey
Copy link

请给一个完整的demo吧,我们这使用都报同一个错误 However, this package itself specifies a main module field that could not be resolved (/Users/jim/.../node_modules/react-native-staggered-list/index.tsx. Indeed, none of these files exist: 可不可以加上QQ聊一下:1145529730 谢谢

@lxhn
Copy link

lxhn commented Aug 1, 2022

出现相同的问题
bundling failed: Error: While trying to resolve module react-native-staggered-list from file D:\WorkSpace\workspaceAndroid\***\src\page\main\MainPage-gd.js, the package D:\WorkSpace\workspaceAndroid\***\node_modules\react-native-staggered-list\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (D:\WorkSpace\workspaceAndroid\***\node_modules\react-native-staggered-list\index.tsx. Indeed, none of these files exist:

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

3 participants