Error: Cannot find module 'underscore'
See original GitHub issueSeems that upon installing email-templates
and pug
, by importing email-templates
I get the following error:
The code I’m using is quite simple:
const Email = require("email-templates");
const email = new Email({
message: { from: fromAddr },
send: true,
transport: __transport
});
email
.send({
template,
message: { to: toAddr },
locals: Object.assign({
emailID
}, properties)
});
__transport
is a Nodemailer transport instance:
__transport = nodemailer.createTransport({
SES: getSES()
});
I’m running this on Node 10 in a docker container. Everything installs fine, but I get that error when I try to run that code. I’m using Nodemailer v4.6.8 and email-templates v5.0.0.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (2 by maintainers)
Top Results From Across the Web
jshint Error: Cannot find module 'underscore' - Stack Overflow
When you have cannot find module x errors, one thing that might help sometimes is deleting the whole npm_modules folder and just running...
Read more >Cannot find module 'underscore'. · Issue #4636 - GitHub
I am trying to include Underscore "underscore": "^1.8.3" and I get this error Cannot find module 'underscore'. This is how I try to...
Read more >Cannot find module 'underscore.js' - Google Groups
Hi, I'm having trouble setting the Cloud Code. Getting a "invalid function" error message. The log is saying that "underscore" is not loaded:...
Read more >underscore - npm
Underscore.js is a utility-belt library for JavaScript that provides support for the usual functional suspects (each, map, reduce, filter.
Read more >Cannot find module 'underscore' from inside npm dependency
I get this error when building a Meteor 1.4.2 app with a custom Meteor package, which depends on the npm module html-to-text :...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Reinstall node_modules and/or reinstall node. This does not seem to be related to this package since this package does not use underscore directly.
Well thanks for the overwhelming support. I’ll find another library.