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

Error: Cannot find module '../package.json' from 'node_modules/react-native-cashfree-pg-sdk/lib/commonjs/index.js' #13

Open
gdpr1504 opened this issue Nov 16, 2022 · 2 comments

Comments

@gdpr1504
Copy link

Bug foung inside node_modules\react-native-cashfree-pg-sdk\lib\commonjs\index.js. You are trying to import package.json file:
image
Here it is clearly checking the package.json file in lib where as the package.js is provided in react-native-cashfree-pg-sdk folder. Due to this we are facing the issue.

Lib Folder Contents:
image
This clearly doesnot contain the package.json file

react-native-cashfree-pg-sdk Contents:

image
This folder contains the package.json file.

Solution to solve the problem: Changing the path for acquiring package.json in index.js will solve this issue (or) copying the package.json from react-native-cashfree-pg-sdk and pasting it into lib folder.

@crstnmac
Copy link

crstnmac commented Mar 4, 2023

I think there is nobody in their team to maintain this library 🤔

@vidurajith-darshana
Copy link

I fixed that issue by removing .tsx and adding the .js to my file extension. for example,

App.tsx -> App.js

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