Heroku cannot find `babel-core/register`
<p>I am building a small url-shortener app using NodeJS. I am writing the code in ES6, using an index file that imports Babel and then my server:</p>

<pre><code>require('babel-core/register');
require('./server.js');
</code></pre>

<p>This works absolutely fine on localhost and all my ES6 code works correctly.</p>

<p>However, when I successfully deploy to Heroku, I receive an application error with the following showing up in heroku logs --tail -a shortenthisurl:</p>

<pre><code>2016-02-06T12:31:14.074071+00:00 heroku[slug-compiler]: Slug compilation started
2016-02-06T12:31:14.074080+00:00 heroku[slug-compiler]: Slug compilation finished
2016-02-06T12:31:13.936954+00:00 heroku[api]: Deploy f576f69 by rory88@gmail.com
2016-02-06T12:31:13.936991+00:00 heroku[api]: Release v17 created by rory88@gmail.com
2016-02-06T12:31:14.230327+00:00 heroku[web.1]: State changed from crashed to starting
2016-02-06T12:31:15.215417+00:00 heroku[web.1]: Starting process with command `node index.js`
2016-02-06T12:31:16.816525+00:00 app[web.1]: module.js:341
2016-02-06T12:31:16.816534+00:00 app[web.1]:     throw err;
2016-02-06T12:31:16.816535+00:00 app[web.1]:     ^
2016-02-06T12:31:16.816536+00:00 app[web.1]:
2016-02-06T12:31:16.816541+00:00 app[web.1]: Error: Cannot find module 'babel-core/register'
2016-02-06T12:31:16.816541+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:339:15)
2016-02-06T12:31:16.816542+00:00 app[web.1]:     at Function.Module._load (module.js:290:25)
2016-02-06T12:31:16.816543+00:00 app[web.1]:     at Module.require (module.js:367:17)
2016-02-06T12:31:16.816544+00:00 app[web.1]:     at require (internal/module.js:16:19)
2016-02-06T12:31:16.816544+00:00 app[web.1]:     at Object.&lt;anonymous&gt; (/app/index.js:1:63)
2016-02-06T12:31:16.816545+00:00 app[web.1]:     at Module._compile (module.js:413:34)
2016-02-06T12:31:16.816546+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:422:10)
2016-02-06T12:31:16.816546+00:00 app[web.1]:     at Module.load (module.js:357:32)
2016-02-06T12:31:16.816547+00:00 app[web.1]:     at Function.Module._load (module.js:314:12)
2016-02-06T12:31:16.816547+00:00 app[web.1]:     at Function.Module.runMain (module.js:447:10)
2016-02-06T12:31:17.669897+00:00 heroku[web.1]: State changed from starting to crashed
2016-02-06T12:31:17.655186+00:00 heroku[web.1]: Process exited with status 1
2016-02-06T12:31:40.693975+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=shortenthisurl.herokuapp.com request_id=c2bffaba-4de6-4310-b535-4ff37ec637ad fwd="86.1.35.144" dyno= connect= service= status=503 bytes=
</code></pre>

<p>Here is my <code>package.json</code>:</p>

<pre><code>{
  "name": "shortenthisurl",
  "version": "1.0.0",
  "description": "",
  "main": "server.js",
  "scripts": {
    "test": "mocha --compilers js:babel-register -w",
    "start": "node server.js",
    "babel-node": "babel-node --stage 0 --ignore='foo|bar|baz'",
    "build": "babel -d lib"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "babel": "^6.3.26",
    "chai": "^3.5.0",
    "express": "^4.13.4",
    "lodash": "^4.2.1",
    "mocha": "^2.4.5",
    "mongoose": "^4.4.1",
    "request": "^2.69.0"
  },
  "devDependencies": {
    "babel-core": "^6.4.5",
    "babel-preset-es2015": "^6.3.13",
    "babel-register": "^6.4.3"
  }
}
</code></pre>

<p>Perhaps I am not correctly importing Babel. Do you have any advice for how I might going about getting this to work?</p>

<p>Here is a link to the full repo on Github: <a href="https://github.com/alanbuchanan/shortenthisurl" rel="noreferrer">https://github.com/alanbuchanan/shortenthisurl</a></p>