functions-samples icon indicating copy to clipboard operation
functions-samples copied to clipboard

Deploy error: Cannot find module 'nodemailer'

Open Fomare opened this issue 8 years ago • 2 comments

I am trying to deploy the sendEmailConfirmation firebase function and I get this error:

! functions[sendEmailConfirmation]: Deployment error. Function load error: Code in file index.js can't be loaded. Did you list all required modules in the package.json dependencies? Detailed stack trace: Error: Cannot find module 'nodemailer'

I did npm install nodemailer. My package.json dependencies: "firebase": "^4.12.0", "firebase-admin": "^5.12.0", "nodemailer": "^4.6.4",

Fomare avatar Apr 16 '18 18:04 Fomare

Check package.json under functions folder, it's complaining because it didn't find there.

ghost avatar May 04 '18 03:05 ghost

I hope the solution by @itwarehub solved this!

samtstern avatar Dec 06 '18 18:12 samtstern