I am currently developing a mobile application using Ionic with Angular/Typescript, and I'm in need of a front-end solution to dynamically send emails in the background to a specific email address. I tried using emailjs, but it requires JavaScript which is not compatible with Ionic. I discovered another mail client called "nodemailer" that works with Typescript. There is a tutorial for nodemailer available at:
When attempting to install nodemailer according to the provided instructions, I encountered an error. The parts of the installation that were successful include:
- npm install --save nodemailer
- npm install @types/node --save
- npm install @types/nodemailer --save
- npm install @types/nodemailer-direct-transport --save
- npm install @types/nodemailer-smtp-transport --save
The problematic installation step was:
npm install @types/nodemailer-bluebird --save
Upon running the above command, I received the following error message:
npm ERR! code E404
npm ERR! 404 Not Found: @types/nodemailer-bluebird@latest
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Nicholas1\AppData\Roaming\npm-cache\ _logs\2019-09-09T17_59_48_776Z-debug.log
Any assistance in resolving this error would be greatly appreciated as my online searches have been unsuccessful. Please feel free to request any additional information you may require.
Minimal Reproducible Example;
- Install node.js and npm from: https://www.npmjs.com/get-npm
- Install Ionic and Cordova CLI by running: C:> npm install -g cordova ionic -> To check your Ionic version, run: ionic -v
- Navigate to your workspace directory and create a new project with the following command: C:\Desktop> ionic start myApp blank
- To test the app in a web browser, execute: C:\Desktop\myApp> ionic serve
Follow the installation instructions at:
Next, run the following commands for successful installations:
- C:\Desktop\myApp> npm install --save nodemailer
- C:\Desktop\myApp> npm install @types/node --save
- C:\Desktop\myApp> npm install @types/nodemailer --save
- C:\Desktop\myApp> npm install @types/nodemailer-direct-transport --save
- C:\Desktop\myApp> npm install @types/nodemailer-smtp-transport --save
Proceeding to the next installation instruction, there should be an error encountered:
npm install @types/nodemailer-bluebird --save
- The error message related to the above command is:
npm ERR! code E404 npm ERR! 404 Not Found: @types/nodemailer-bluebird@latest npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User1\AppData\Roaming\npm-cache\ _logs\2019-09- 09T17_59_48_776Z-debug.log