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
npm install emailjs worked but all attempts at require fail #112
Comments
OK, I've finally found my error. All my fault. var email = require('emailjs'); works fine once I saw I'd left out a module.exports line... Ugh. |
Hi i am having the same issue. What moule.exports line? and where?? |
after |
same issue here !! |
if you use npm to install emailjs all you need to do is |
I'm fairly new to node et. al. and I've installed several packages and used them happily but I am having a real issue with getting emailjs to even get loaded. After the "install npm emailjs", which worked without errors, I do indeed see the whole emailjs tree inside node_modules off the root of my project just like any other package install.
I have tried many variations now on the require statement in the router where I want to use emailjs but they all fail at npm start time with error statements about a failure to find required middleware the details of which according to exactly what require I try. Apparently I do not understand what require("./path/to/emailjs/email") should become in my case even. I realize you don't have all my code here but I'd thought I'd first see if there's just something simple I'm just missing regarding the darn require statement:
For emailjs none of the following have worked:
//var email = require('emailjs/email');
//var email = require('node_modules/emailjs/email');
//var email = require('./node_modules/emailjs/email');
//var email = require('./emailjs/email');
//var email = require('email');
//var email = require('emailjs');
Apparently I do not understand what require("./path/to/emailjs/email") should become in my case even though I don't have to do anything for any other package other than require('packagename') to get it to go. I realize you don't have all my code here but I'd thought I'd first see if there's just something simple I'm just missing regarding the darn require statement:
I apologize if this is not appropriate as an issue here but I've found no help from google and I'm about to give up on emailjs and I really don't want to. Thanks.
The text was updated successfully, but these errors were encountered: