Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I having trouble with import nodemailer from 'nodemailer' #1642

Open
haroldm2598 opened this issue Apr 17, 2024 · 2 comments
Open

I having trouble with import nodemailer from 'nodemailer' #1642

haroldm2598 opened this issue Apr 17, 2024 · 2 comments

Comments

@haroldm2598
Copy link

haroldm2598 commented Apr 17, 2024

Nextjs typescript nodemailer.

When using import nodemailer from 'nodemailer'; I get:

Could not find a declaration file for module 'nodemailer'. 'c:/*/*/*/*/*/node_modules/nodemailer/lib/nodemailer.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/nodemailer` if it exists or add a new declaration (.d.ts) file containing `declare module 'nodemailer';`ts(7016)
@haroldm2598
Copy link
Author

haroldm2598 commented Apr 17, 2024

SOLVED i replace
import nodemailer from 'nodemailer'
to
const nodemailer = require('nodemailer')

@YO-SC
Copy link

YO-SC commented Apr 22, 2024

It would be cool to have ES6 module support :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants