in-app-payments-react-native-plugin icon indicating copy to clipboard operation
in-app-payments-react-native-plugin copied to clipboard

React native square in app payments contains invalid package.json and requires this patch to work

Open furyswordxd opened this issue 7 months ago • 1 comments

Here's a patch-package patch to fix the issue:

diff --git a/node_modules/react-native-square-in-app-payments/package.json b/node_modules/react-native-square-in-app-payments/package.json
index 7617121..724ba4b 100644
--- a/node_modules/react-native-square-in-app-payments/package.json
+++ b/node_modules/react-native-square-in-app-payments/package.json
@@ -2,13 +2,13 @@
   "name": "react-native-square-in-app-payments",
   "version": "2.0.0",
   "description": "An open source React Native plugin for calling Square’s native In-App Payments SDK to take in-app payments on iOS and Android.",
-  "main": "./lib/module/index.js",
-  "types": "./lib/typescript/src/index.d.ts",
+  "main": "./src/index.ts",
+  "types": "./src/types/index.ts",
   "exports": {
     ".": {
       "source": "./src/index.tsx",
-      "types": "./lib/typescript/src/index.d.ts",
-      "default": "./lib/module/index.js"
+      "types": "./src/types/index.ts",
+      "default": "./src/index.ts"
     },
     "./package.json": "./package.json",
     "./app.plugin.js": "./app.plugin.js"

Originally posted by @todesignandconquer in #259

furyswordxd avatar Apr 26 '26 18:04 furyswordxd

@cesar-sosa-hol !!!

mat4n avatar May 25 '26 14:05 mat4n

Hi @matanassa This was fixed in last version 2.0.1

cesar-sosa-hol avatar Jul 10 '26 14:07 cesar-sosa-hol