Picture of Roger Tremblay
Heroku Deployment Directions
by Roger Tremblay - Wednesday, 17 June 2015, 4:51 PM
 

Hi there,

 

I've been trying to deploy to Heroku and am hitting a snag - at appears nodemailer cannot be found. Are there specific directions on Heroku deployment? I'm guessing it's something that I'm missing...

 

Here's the error I'm getting, thanks!

 

heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `node server.js`
app[web.1]: Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
app[web.1]: Recommending WEB_CONCURRENCY=1
app[web.1]: module.js:338
app[web.1]: ^
app[web.1]: throw err;
app[web.1]: at Object.Module._extensions..js (module.js:478:10)
app[web.1]: at Module.require (module.js:365:17)
app[web.1]: Error: Cannot find module 'nodemailer'
app[web.1]: at Module._compile (module.js:460:26)
app[web.1]: at Function.Module._resolveFilename (module.js:336:15)
app[web.1]: at Function.Module._load (module.js:278:25)
app[web.1]: at Module.load (module.js:355:32)
app[web.1]: at Module.require (module.js:365:17)
app[web.1]: at require (module.js:384:17)
app[web.1]: at Object.<anonymous> (/app/lib/mailer.js:2:18)
app[web.1]: at Function.Module._load (module.js:310:12)
app[web.1]: at require (module.js:384:17)
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: Process exited with status 1

Picture of Dan Gray
Re: Heroku Deployment Directions
by Dan Gray - Tuesday, 23 June 2015, 9:20 PM
 

Hi Roger

Just trying on Heroku as well. Also getting a problem with nodemailer and node-ployglot not being in the production dependencies on the package.json file. I added the following to the end of the dependencies list in package.json and no longer get the errors. I'm deploying the master branch.

    "nodemailer": "~1.3.0",
    "node-polyglot": "~0.4.1"

Also noticed that engines part of this file is not set to a specific node version. I think there is a hard dependency on using node version 0.10.33 at the moment. So I changed this value to;

"engines": {
"node": "0.10.33"
},

I still get some errors when the app is run though but probably due to not setting any environment variables up yet or specifying the mongodb connection. I'll upload a document when I get it to run.

Dan

 

Picture of Gareth Walker
Re: Heroku Deployment Directions
by Gareth Walker - Tuesday, 20 December 2016, 3:12 PM
 

Hi Dan, Roger,

Thinking of using heroku for my first non-vagrant cloud-based authoring tool trial. Had this worked for you? Any tips? (The official documentation in the wiki runs out just when it gets most useful!)