leecade / leecade/react-native-swiper
Module error not working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Windows 10 ?
Version
Which versions are you using:
- react-native-swiper v 1.60 and 1.5.14?
- react-native v0.64.2?.?
Expected behaviour
image slider swipe
Actual behaviour
[Error: InternalError Metro has encountered an error: While trying to resolve module react-native-swiper from file C:\ClientProjects\delivery360\src\screens\authScreens\SignInWelcomeScreen.js, the package C:\ClientProjects\delivery360\node_modules\react-native-swiper\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (C:\ClientProjects\delivery360\node_modules\react-native-swiper\index.js. Indeed, none of these files exist:
- C:\ClientProjects\delivery360\node_modules\react-native-swiper\index.js(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
- C:\ClientProjects\delivery360\node_modules\react-native-swiper\index.js\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx): C:\ClientProjects\delivery360\node_modules\metro\src\node-haste\DependencyGraph.js (436:17)
434 |
435 | if (error instanceof InvalidPackageError) {
436 | throw new PackageResolutionError({
| ^
437 | packageError: error,
438 | originModulePath: from,
439 | targetModuleName: to]
Error: While trying to resolve modulereact-native-swiperfrom fileC:\ClientProjects\delivery360\src\screens\authScreens\SignInWelcomeScreen.js, the packageC:\ClientProjects\delivery360\node_modules\react-native-swiper\package.jsonwas successfully found. However, this package itself specifies amainmodule field that could not be resolved (C:\ClientProjects\delivery360\node_modules\react-native-swiper\index.js. Indeed, none of these files exist:
How to reproduce it>
To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.
Steps to reproduce
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking the package.json main entry for react-native-swiper and whether the referenced index.js exists in the installed package. Review the reported import from src/screens/authScreens/SignInWelcomeScreen.js and reproduce the Metro resolution error on Windows 10 with the listed React Native and package versions. Done means the package resolves successfully or the missing-package cause is documented with a reproducible example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100