Closed r0adrunner closed 3 years ago
Hey @r0adrunner did you find any solution? Otherwise, i will have some time this Sunday to check it
Hi @angelos3lex
Just realized the example I gave does not satisfy
"peerDependencies": {
"react-native": "^0.41.2"
}
in package.json Maybe it's that. But didn't find any client solution, for the moment I'm going with a server solution.
But maybe a feature request, make it work with the latest react-native?
I got this error message when import react-native-smtp-mailer:
Could not find a declaration file for module 'react-native-smtp-mailer'. 'c:/Users/.../node_modules/react-native-smtp-mailer/index.js' implicitly has an 'any' type. Try 'npm install @types/react-native-smtp-mailer' if it exists or add a new declaration (.d.ts) file containing 'declare module 'react-native-smtp-mailer';'
ok. i found a solution is edit link this lib in Podfile.
pod 'RNSmtpMailer', :path => '../node_modules/react-native-smtp-mailer/ios'
instead of the original is
pod 'RNSmtpMailer', :path => '../node_modules/react-native-smtp-mailer
It seems that the problem with the location of the podspec file path causes ios to be unable to get the link and unable to get resources
I got this error message when import react-native-smtp-mailer:
Could not find a declaration file for module 'react-native-smtp-mailer'. 'c:/Users/.../node_modules/react-native-smtp-mailer/index.js' implicitly has an 'any' type. Try 'npm install @types/react-native-smtp-mailer' if it exists or add a new declaration (.d.ts) file containing 'declare module 'react-native-smtp-mailer';'
This is because this module has no definition file yet.
ok. i found a solution is edit link this lib in Podfile.
pod 'RNSmtpMailer', :path => '../node_modules/react-native-smtp-mailer/ios'
instead of the original ispod 'RNSmtpMailer', :path => '../node_modules/react-native-smtp-mailer
It seems that the problem with the location of the podspec file path causes ios to be unable to get the link and unable to get resources
nice catch!
The bug report says it does not work in android emulator The solutions posted by Thanhcao86 seem to be related to ios. The problem posted by JosMMV seems unrelated to original error
Why is this closed?
The problem posted by JosMMV seems unrelated to original error
I got the original error too, but additionally, the console returns the error message that I posted.
Hello, I have the same issue working on Android emulator. I did automated linking and checked manual as well, but still have null. Please help.
@r0adrunner This seems an issue after ejecting an expo project, as by using it in a new project initiated with react-native-cli on latest version works flawlessly. Since i reproduced, the way i managed to resolve the issue was by the following steps:
Then the imported module is no longer null. Not sure what helped. Probably the npm i command, as the expo used yarn by default and as i can see there was a bad synchronization between them, making this module not visible for link, and the manual link was not working as well. It's not advised to use both in an app anyway, just one of them. Please close the issue if this fixes it for u
@angelos3lex Thank you for your reply. My project wasn't expo at the beginning so I didn't do ejection. However react-native-smtp-mailer worked for me when I updated react-native version. Next step is to make attached pictures working :)
@BepaTest are you referring to #29?
@angelos3lex