ridenui / react-native-riden-ssh

MIT License
0 stars 1 forks source link

usage #10

Open mojtabasji opened 2 years ago

mojtabasji commented 2 years ago

how can i use in js not ts i removed "as SSHConfig" from end of new SSHClient and i received below error in the following

[Unhandled promise rejection: Invariant Violation:new NativeEventEmitter()requires a non-null argument. or

[Unhandled promise rejection: TypeError: null is not an object (evaluating 'SSH.connect')]
at http://192.168.1.145:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:120071:52 in connect$
mojtabasji commented 2 years ago

how can i use in js not ts i removed "as SSHConfig" from end of new SSHClient and i received below error in the following

[Unhandled promise rejection: Invariant Violation:new NativeEventEmitter()requires a non-null argument. or

[Unhandled promise rejection: TypeError: null is not an object (evaluating 'SSH.connect')]
at http://192.168.1.145:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false&strict=false&minify=false:120071:52 in connect$

i checked that nativeModule returns null to SSH variable where is the problem?? my confiqure is : +-- @babel/core@7.18.6 +-- @ridenui/react-native-riden-ssh@1.8.22 +-- expo-status-bar@1.3.0 +-- expo@45.0.6 +-- react-dom@17.0.2 +-- react-native-web@0.17.7 +-- react-native@0.68.2 +-- react-ssh2-hook@0.5.0 `-- react@17.0.2

TheNoim commented 2 years ago

Did you run pod install? Or can you provide a small reproduction project?

mojtabasji commented 2 years ago

i using expo so i have not ios folder or pod install command also i try it in new empty project but same result look at this: expo Snak with more search i found probably its react native's bug have you any idea for fix this??