title: NPM errors after successfully building and deploying rails app to heroku
body: <p>I've been working on a rails app using google-maps-4-rails to visualize the bicycle stations. The app worked fine on my local server, but I am getting errors while deploying to Heroku. I tried launching it locally in production environment but it works correctly. I am at loss, and since it is my first venture into front-end, I don't know how to handle this situation. </p>
  
  <p>I've added the nodejs buildpack earlier to solve some other issue, maybe it's causing problems. I also formated the package.json, though I am not entirely sure if it's correct. Earlier problems were connected to yarn not being available on heroku.</p>
  
  <p>My package.json :</p>
  
  <pre><code>{
    "name": "sample_app",
    "private": true,
    "engines": {
      "yarn": "1.7.0"
    },
    "scripts": {
      "start": "node server"
    },
    "dependencies": {},
    "keywords": [
      "node",
      "heroku"
    ]
  }
  
  </code></pre>
  
  <p>My logs from heroku :</p>
  
  <pre><code>: Starting process with command `npm start`
  2019-04-20T09:54:42.459328+00:00 heroku[web.1]: State changed from starting to crashed
  2019-04-20T09:54:42.009377+00:00 app[web.1]: 
  2019-04-20T09:54:42.009398+00:00 app[web.1]: &gt; sample_app@ start /app
  2019-04-20T09:54:42.009399+00:00 app[web.1]: &gt; node server
  2019-04-20T09:54:42.009401+00:00 app[web.1]: 
  2019-04-20T09:54:42.337386+00:00 app[web.1]: internal/modules/cjs/loader.js:584
  2019-04-20T09:54:42.337425+00:00 app[web.1]: throw err;
  2019-04-20T09:54:42.337427+00:00 app[web.1]: ^
  2019-04-20T09:54:42.337429+00:00 app[web.1]: 
  2019-04-20T09:54:42.337431+00:00 app[web.1]: Error: Cannot find module '/app/server'
  2019-04-20T09:54:42.337433+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
  2019-04-20T09:54:42.337434+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:508:25)
  2019-04-20T09:54:42.337436+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
  2019-04-20T09:54:42.337438+00:00 app[web.1]: at startup (internal/bootstrap/node.js:283:19)
  2019-04-20T09:54:42.337439+00:00 app[web.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
  2019-04-20T09:54:42.343303+00:00 app[web.1]: npm ERR! code ELIFECYCLE
  2019-04-20T09:54:42.343921+00:00 app[web.1]: npm ERR! errno 1
  2019-04-20T09:54:42.345414+00:00 app[web.1]: npm ERR! sample_app@ start: `node server`
  2019-04-20T09:54:42.345427+00:00 app[web.1]: npm ERR! Exit status 1
  2019-04-20T09:54:42.349073+00:00 app[web.1]: npm ERR!
  2019-04-20T09:54:42.349078+00:00 app[web.1]: npm ERR! Failed at the sample_app@ start script.
  2019-04-20T09:54:42.349081+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  2019-04-20T09:54:42.352338+00:00 app[web.1]: 
  2019-04-20T09:54:42.352554+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
  2019-04-20T09:54:42.353207+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2019-04-20T09_54_42_347Z-debug.log
  2019-04-20T09:54:42.440910+00:00 heroku[web.1]: Process exited with status 1
  </code></pre>
  
  <p>I am not sure what files may be helpful, please let me know If I can provide any other that would be of assistance</p>