---
title: "Rohan Bagchi (@rbagchi) | Hashnode"
description: "writes code. Read the latest articles by Rohan Bagchi on Hashnode."
url: "https://hashnode.com/@rbagchi"
---

@rbagchi

# Rohan Bagchi

@rbagchi · Bangalore · Joined December 2016

writes code

## Comments

[Also, we need to update the renderFullPage function in server.js. The generated js & css is mapped by manifest.json as "/main.css": "/app.<some\_hash>.css" and "/main.js": "/main.<some\_hash>.js". So, the style sheet reference in generated html should be updated to <link rel='stylesheet' href='${assetsManifest\['/main.css'\]}' /> and the js reference to be updated to <script src='${process.env.NODE\_ENV === 'production' ? assetsManifest\['/main.js'\] : '/app.js'}'></script>. Then run npm run build:server and deploy.](https://hashnode.com/posts/deploying-mern-to-heroku-success/5737b4e8911fe184eb43bbb3/comment/589a0e7a93a28f88162ce19d#reply-589aa89a3fb380655d72c58d)

Reply · Article · Feb 8, 2017 · 4 · [Deploying MERN to Heroku (success)](https://hashnode.com/posts/deploying-mern-to-heroku-success/5737b4e8911fe184eb43bbb3)

[As it turns out, we have to run npm run build:serverto generate the missing server.bundle file.](https://hashnode.com/posts/deploying-mern-to-heroku-success/5737b4e8911fe184eb43bbb3/comment/589a0e7a93a28f88162ce19d#reply-589a134ab8c198c4787ea4f3)

Reply · Article · Feb 7, 2017 · 1 · [Deploying MERN to Heroku (success)](https://hashnode.com/posts/deploying-mern-to-heroku-success/5737b4e8911fe184eb43bbb3)

[I get the error Error: Cannot find module './dist/server.bundle.js'. I checked the dist folder and no server.bundle.js was generated. Any idea what could be going wrong?](https://hashnode.com/posts/deploying-mern-to-heroku-success/5737b4e8911fe184eb43bbb3/comment/589a0e7a93a28f88162ce19d)

Comment · Article · Feb 7, 2017 · 1 · [Deploying MERN to Heroku (success)](https://hashnode.com/posts/deploying-mern-to-heroku-success/5737b4e8911fe184eb43bbb3)
