Skip to content

Commit 9df5c6a

Browse files
authored
fix: installation error (#12)
1 parent a4a0e01 commit 9df5c6a

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
7+
- alpha
8+
- beta
9+
- next
10+
- "*.x"
1011

1112
defaults:
1213
run:

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,23 @@ const main = async () => {
4040
};
4141
```
4242

43-
## ⚠️ Partial USB Support
43+
## ⚠️ Known Issues
44+
45+
### Error `RCTEvents.receiveEvent() is not registered`
46+
47+
tl;dr Do not use `index.tsx` as your entrypoint, use something like `app.tsx`
48+
instead.
49+
50+
This error happens when all of the following conditions are met:
51+
52+
1. You have `expo-router` installed
53+
2. You have new architecture enabled
54+
3. You are using `index.tsx` as your entrypoint
55+
56+
When expo-router's own modified entrypoint sees your `index.tsx`, it will be
57+
confused and incorrectly overrides some native modules.
58+
59+
### Partial USB Support
4460

4561
USB connections without specified a serial number is supported and tested in the
4662
following environments (see

examples/testprint-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "testprint-app",
3-
"version": "0.0.0-development",
3+
"version": "0.0.0",
44
"private": true,
55
"main": "expo-router/entry",
66
"scripts": {
@@ -37,7 +37,7 @@
3737
"react": "18.2.0",
3838
"react-dom": "18.2.0",
3939
"react-native": "0.74.5",
40-
"react-native-citizen-escposprinter": "0.0.0-development",
40+
"react-native-citizen-escposprinter": "*",
4141
"react-native-gesture-handler": "~2.16.1",
4242
"react-native-reanimated": "^3.15.1",
4343
"react-native-safe-area-context": "4.10.5",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"packages/*"
66
],
77
"scripts": {
8-
"prepare": "husky",
8+
"prepare": "husky && yarn workspace react-native-citizen-escposprinter run build",
99
"test": "yarn workspaces run test"
1010
},
1111
"prettier": {

packages/react-native-citizen-escposprinter/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-citizen-escposprinter",
3-
"version": "0.0.0-development",
3+
"version": "0.0.0",
44
"description": "A Turbo Module wrapper for the Citizen ESC POS Printer SDK.",
55
"keywords": [
66
"react-native",
@@ -54,10 +54,9 @@
5454
"!**/.*"
5555
],
5656
"scripts": {
57-
"postinstall": "bob build",
57+
"build": "bob build",
5858
"lint": "eslint \"**/*.{js,ts,tsx}\"",
59-
"prepack": "bob build",
60-
"prepare": "bob build",
59+
"prepublishOnly": "bob build",
6160
"test": "tsc --noEmit && jest --collectCoverage"
6261
},
6362
"commitlint": {

0 commit comments

Comments
 (0)