SMTP Local > Error 500

Hi,
I’m following the great tutorials from @ben on youtube and everything working fine except that confirmation email is not working.
I tried with sendgrid, mailgun and gmail. Same error : 500.

In the logs, got this :

 server-connect:server Got error? Error: Cannot find module 'nodemailer'
  server-connect:server Require stack:
  server-connect:server - /opt/node_app/lib/modules/mail.js
  server-connect:server - /opt/node_app/lib/core/app.js
  server-connect:server - /opt/node_app/lib/core/middleware.js
  server-connect:server - /opt/node_app/lib/setup/routes.js
  server-connect:server - /opt/node_app/lib/server.js
  server-connect:server - /opt/node_app/index.js
  server-connect:server     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
  server-connect:server     at Function.Module._load (internal/modules/cjs/loader.js:667:27)
  server-connect:server     at Module.require (internal/modules/cjs/loader.js:887:19)
  server-connect:server     at require (internal/modules/cjs/helpers.js:74:18)
  server-connect:server     at App.send (/opt/node_app/lib/modules/mail.js:87:28)
  server-connect:server     at App._exec (/opt/node_app/lib/core/app.js:481:57)
  server-connect:server     at App._exec (/opt/node_app/lib/core/app.js:452:28)
  server-connect:server     at processTicksAndRejections (internal/process/task_queues.js:97:5)
  server-connect:server     at async App.exec (/opt/node_app/lib/core/app.js:421:9)
  server-connect:server     at async App.define (/opt/node_app/lib/core/app.js:411:9) {
  server-connect:server   code: 'MODULE_NOT_FOUND',
  server-connect:server   requireStack: [
  server-connect:server     '/opt/node_app/lib/modules/mail.js',
  server-connect:server     '/opt/node_app/lib/core/app.js',
  server-connect:server     '/opt/node_app/lib/core/middleware.js',
  server-connect:server     '/opt/node_app/lib/setup/routes.js',
  server-connect:server     '/opt/node_app/lib/server.js',
  server-connect:server     '/opt/node_app/index.js'
  server-connect:server   ]
  server-connect:server } +6m  

And in the browser :

{
    "status": "500",
    "code": "MODULE_NOT_FOUND",
    "message": "Cannot find module 'nodemailer'\nRequire stack:\n- /opt/node_app/lib/modules/mail.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js",
    "stack": "Error: Cannot find module 'nodemailer'\nRequire stack:\n- /opt/node_app/lib/modules/mail.js\n- /opt/node_app/lib/core/app.js\n- /opt/node_app/lib/core/middleware.js\n- /opt/node_app/lib/setup/routes.js\n- /opt/node_app/lib/server.js\n- /opt/node_app/index.js\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:667:27)\n    at Module.require (internal/modules/cjs/loader.js:887:19)\n    at require (internal/modules/cjs/helpers.js:74:18)\n    at App.send (/opt/node_app/lib/modules/mail.js:87:28)\n    at App._exec (/opt/node_app/lib/core/app.js:481:57)\n    at App._exec (/opt/node_app/lib/core/app.js:452:28)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)\n    at async App.exec (/opt/node_app/lib/core/app.js:421:9)\n    at async App.define (/opt/node_app/lib/core/app.js:411:9)"
} 

I have installed nodemailer, but still got the same issue.
There is no way to use API instead of SMTP? How to fix this error 500 problem?

Thanks for your support.

Community Page
Last updated: