angelos3lex / react-native-smtp-mailer

Send emails by connecting to smtp server+attachments, using android javamail and ios mailcore2
38 stars 32 forks source link

Change dependency of react-native #52

Open AlenToma opened 2 years ago

AlenToma commented 2 years ago

Hi, When trying to install this library I have to include --legacy-peer-deps

please change the dependency of react-native and set it to *

eg

"peerDependencies": {
    "react-native": "*"
  }

this should fix the issue of react-native version as it is not imported to specify right

AlenToma commented 2 years ago

I did make a pull request if you are interested https://github.com/angelos3lex/react-native-smtp-mailer/pull/53

angelos3lex commented 2 years ago

Hey @AlenToma with what RN, node and npm version are you trying to install and you get this message?

AlenToma commented 2 years ago

This is my settings

{
  npm: '7.5.4',
  node: '15.6.0',
  v8: '8.6.395.17-node.23',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.1',
  modules: '88',
  nghttp2: '1.42.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1i',
  cldr: '38.0',
  icu: '68.1',
  tz: '2020b',
  unicode: '13.0'
}

The problem accord because I have "react-native": "0.63.4" installed and you are requiring a newer version. Which is not a must. You are not using any specific react-native version so changing the version to * should fix the issue.

AlenToma commented 2 years ago

This is the message I am getting

npm ERR! Found: react-native@0.63.4
npm ERR! node_modules/react-native
npm ERR!   react-native@"0.63.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.41.2" from react-native-smtp-mailer@1.2.5
npm ERR! node_modules/react-native-smtp-mailer
npm ERR!   react-native-smtp-mailer@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See C:\Users\alen\AppData\Local\npm-cache\eresolve-report.txt for a full report.