0

I have a problem with nodemailer in Typescript. I downloaded the package via

npm install --save @types/nodemailer

everything installed correctly, everything is in node_modules, package.JSON dependencies has an entry. When I call the

import * as nodemailer from 'nodemailer' 

file it transposes the tsc and starts the node file.js everything is ok ... but when I add a function call to this file it throws an error "Cannot find module 'nodemailer'. Please help.

1 Answer 1

2

You just installed the type definitions but not the library itself.

You also have to install

node install --save nodemailer
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.