adonisjs / mail

AdonisJS Email Provider
MIT License
106 stars 34 forks source link

Does this support Adonis 4.1? #60

Closed mpastorini closed 3 years ago

mpastorini commented 3 years ago

I'm not sure this is an issue, maybe this lib is only for the new Adonis. I am willing to help develop a solution if necessary.

I followed these instructions and when I try to run my app or simply type adonis in the terminal it throws:

Error: Cannot find module '@adonisjs/mail/providers/MailProvider'
Require stack:
- /home/xxx/workspace/xxx/api/node_modules/require-stack/src/index.js
- /home/xxx/workspace/xxx/api/node_modules/require-stack/index.js
- /home/xxx/workspace/xxx/api/node_modules/@adonisjs/fold/src/Ioc/index.js
- /home/xxx/workspace/xxx/api/node_modules/@adonisjs/fold/index.js
- /home/xxx/workspace/xxx/api/ace
- /home/xxx/.nvm/versions/node/v14.16.0/lib/node_modules/@adonisjs/cli/index.js

(For security reasons I replaced name and company name by xxx)

I noticed it looks different compared to other plugins, it has a build folder with ts files, I was able to get it to work with version 3.0.9 but it doesn't support SES, so for now I replaced it by a custom implementation of nodemailer.

Package version

Adonis 4.1 Adonis CLI 4.0.12 @adonisjs/mail 7.0.0 (Latest)

Node.js and npm version

$ node --version v14.16.0 $ npm --version 6.14.11

Sample Code (to reproduce the issue)

$ adonis install @adonisjs/mail

start/app.js

const providers = [
  ...
  '@adonisjs/mail/providers/MailProvider',
]

Thanks in advance :heart:

thetutlage commented 3 years ago

The latest version targets v5. Please install with legacy tag. We are also working to update the docs on same.

npm i @adonisjs/mail@legacy