functions-samples
functions-samples copied to clipboard
Deploy error: Cannot find module 'nodemailer'
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",
Check package.json under functions folder, it's complaining because it didn't find there.
I hope the solution by @itwarehub solved this!