Cannot find module 'nodemailer'
It looks like you haven't installed nodemailer from npm . Go to your project folder via command line terminal and install nodemailer using the following command. If you have a package.json file (and you probably should), you can use a flag --save
to record the version installed with your application.
npm install nodemailer --save
Please note that nodemailer requires Node.js version 6+ to work correctly. Check your Node.js version with node --version
on Windows or OSX and nodejs --version
on linux.
Since you are asking this question, you might find it helpful to read about npmjs here: https://www.npmjs.com/get-npm
Your package.json file should have the following dependency. You may need to adjust the version number to accommodate Zapier requirements.
{
"dependencies": {
"nodemailer": "^4.0.1"
}
}
When browsing the Zapier website, it looks like they offer tech support even for free customers. You can contact them directly if this does not solve your problem.
source to share
Use this:
npm install nodemailer
And yours var nodemailer = require ('nodemailer')
will work.
https://docs.npmjs.com/getting-started/installing-npm-packages-locally
source to share