Closed NrmeenTomoum closed 4 years ago
I faced the same problem. Did u manage to workaround it? I run the iPhone 11 emulator.
Emulator would have build issue that the package cannot be installed. Plz try to use the real device to check whether problem still.
hi @januslo I just tried implementing the bluetooth ecpos printer in my repo. However, I face this issue as well. I run on real device(android) via expo, but still got this error. Is there some config I missed ya?
same issue as above
@januslo i try to run the demo app on real device but this error still appear. Please help, thanks.
any update yet?
same issue here, work well on android but not work at ios
i'm also facing the same issue ,any option to fix this on iphone ?
delete tsc support on ios, work for me
delete tsc support on ios, work for me
delete tsc support on ios, work for me
Thanks for the reply !!! where to find tsc ?
you need to modify library code, then add to your project using modify library
same issue please update
Emulator would have build issue that the package cannot be installed. Plz try to use the real device to check whether problem still.
i am Using Real IOS Device but problem still Exist. Please tell me solution
delete tsc support on ios, work for me
delete tsc support on ios, work for me
Thanks for the reply !!! where to find tsc ?
you need to modify library code, then add to your project using modify library
can you please share the modify files
I test in real android device i got this error
ERROR Error: Requiring module "node_modules\react-native-bluetooth-escpos-printer\index.js", which threw an exception: TypeError: null is not an object (evaluating 'BluetoothTscPrinter.DIRECTION = { FORWARD: 0, BACKWARD: 1 }')
Please help me please...
My Package.json
{ "name": "poswarePos", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "react": "17.0.2", "react-native": "0.66.3", "react-native-bluetooth-escpos-printer": "^0.0.5" }, "devDependencies": { "@babel/core": "7.16.0", "@babel/runtime": "7.16.3", "@react-native-community/eslint-config": "2.0.0", "babel-jest": "26.6.3", "eslint": "7.14.0", "jest": "26.6.3", "metro-react-native-babel-preset": "0.66.2", "react-test-renderer": "17.0.2" }, "jest": { "preset": "react-native" } }
My Settings.gradle
rootProject.name = 'poswarePos' include ':react-native-bluetooth-escpos-printer' project(':react-native-bluetooth-escpos-printer').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-bluetooth-escpos-printer/android') apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app'
My MainApplication.java
@Override public void onCreate() { super.onCreate(); SoLoader.init(this, / native exopackage / false); initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); new RNBluetoothEscposPrinterPackage(); }
Configure project :react-native-bluetooth-escpos-printer WARNING:: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
TypeError: null não é um objeto (avaliando 'BluetoothTscPrinter.DIRECTION = { FORWARD: 0, BACKWARD: 1 }') iPhone
Did anyone get a solution? I'm running on physical android device and I can't get out of this error.
Same problem here. Running on physical android device.
This applies to iOS in expo bare enviornment.
Install the package from github, not via npm repository. npm install https://github.com/januslo/react-native-bluetooth-escpos-printer.git --save
In case you already installed via npm, go to your ios folder and do a: pod deintegrate Then go back to your root folder and install it via the github repo (above command)
As of writing this, iOS emulators do not support Bluetooth so you need a real device.
Still fails for me
Same for me, 'BluetoothTscPrinter.DIRECTION = { FORWARD: 0, BACKWARD: 1 }'), Iphone 11 pro
You should apply this update
then pod install (that should install the RNBluetoothEscposPrinter dependency)
➜ ios git:(develop) ✗ pod install
Auto-linking React Native modules for target ProxiHalalOrders
: BVLinearGradient, RNBluetoothEscposPrinter, RNCAsyncStorage, RNGestureHandler, RNReanimated, RNScreens, RNSnackbar, RNVectorIcons, react-native-netinfo, react-native-safe-area-context, and react-native-version-number
Analyzing dependencies
Downloading dependencies
Installing RNBluetoothEscposPrinter (0.0.5)
Generating Pods project
Integrating client project
is this work for any one not for me
TypeError: null is not an object (evaluating 'BluetoothTscPrinter.DIRECTION = { FORWARD: 0, BACKWARD: 1 }') iPhone