januslo / react-native-bluetooth-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.
MIT License
349 stars 409 forks source link

TypeError: Cannot set property 'DIRECTION' of null, js engine: hermes #209

Open chaudev opened 1 year ago

chaudev commented 1 year ago
eduardobda commented 1 year ago

I solved it by adding the podscpec. like this.

require "json" package = JSON.parse(File.read(File.join(dir, "package.json"))) Pod::Spec.new do |s| s.name = 'RNBluetoothEscposPrinter' s.version = package['version'] s.summary = package['description'] s.author = 'januslo' s.homepage = 'https://github.com/januslo/react-native-bluetooth-escpos-printer’' s.license = package['license'] s.platform = :ios, '9.0' s.source = { :git => 'https://github.com/januslo/react-native-bluetooth-escpos-printer”, :tag => “#{s.version}”'} s.source_files = "ios/*/.{h,c,m,swift}" s.requires_arc = true s.dependency "React" end

Also after that, in the file RNBluetoothEscposPrinter.m of the module I changed the import to #import "ZXingObjC.h"

I hope this solve your problem as id did for me

wongmalesan commented 1 year ago

Hello @eduardobda , i have counter the same error, where should i put the code? and can you share the change code or screenshot of your podscpec?

Thanks

eduardobda commented 1 year ago

Hello @wongmalesan In the node_modules folder go to the react-native-escpos-printer folder, in there you have to create RNBluethoothEscposPrinter.podspec, then in the same module look for the ios folder to edit the RNBluetoothManager.m to change an import to #import "ZXingObjC.h" insted of "#import "ZXingObjC/ZXingObjC.h"" If you have any question you can reply to this and I will check it as soon as I can

tngone-aashique commented 2 months ago

@eduardobda not able to solve the issue by the above solution still getting the error