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

Build error in react-native 0.70 #361

Closed
Ghoral opened this issue Oct 8, 2022 · 3 comments
Closed

Build error in react-native 0.70 #361

Ghoral opened this issue Oct 8, 2022 · 3 comments

Comments

@Ghoral
Copy link

Ghoral commented Oct 8, 2022

Hi,
I am getting this error while running the project. The build is successful. The error comes while running the project.

Here is my error

Error: While trying to resolve module react-native-paymentsfrom file/Applications/Work/myapp/src/components/mycomponent, the package /Applications/Work/myapp/node_modules/react-native-payments/package.jsonwas successfully found. However, this package itself specifies amain module field that could not be resolved (/Applications/Work/myapp/node_modules/react-native-payments/index.js. Indeed, none of these files exist:

react-native info:
`
Versions:

  • "react-native": "0.70.2",
  • "react": "18.1.0",
    System:
    OS: macOS 12.5.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 411.11 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
    Binaries:
    Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
    Yarn: 1.22.19 - ~/node_modules/.bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
    Watchman: 2022.07.04.00 - /usr/local/bin/watchman
    Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
    SDKs:
    iOS SDK:
    Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK: Not Found
    IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild
    Languages:
    Java: 11.0.16 - /usr/bin/javac
    npmPackages:
    @react-native-community/cli: ^9.0.0 => 9.0.0
    react: Not Found
    react-native: Not Found
    react-native-macos: Not Found
    npmGlobalPackages:
    react-native: Not Found`

Thankyou.

@priyanshipatel248
Copy link

First Way-->

  1. uninstall node modules & uninstall app
  2. reinstall node modules
    3.Then Try to run again

Second Way ---->
Use this Module instead of react native payments
https://www.npmjs.com/package/@stripe/stripe-react-native

@Ghoral
Copy link
Author

Ghoral commented Oct 9, 2022

Thank you,
But I need google and apple pay which react-native-payment provides.

@Ghoral
Copy link
Author

Ghoral commented Oct 11, 2022

fixed by doing --save

@Ghoral Ghoral closed this as completed Oct 11, 2022
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

2 participants