title: Uncaught SyntaxError: Unexpected token < while deploying to Heroku
body: <p>I was deploying a MEAN app on Heroku. But keep getting this Uncaught SyntaxError: Unexpected token &lt;. In the console, it says it's in the index.js file that is in the public folder. It's from Traversy Media's MEAN APP tutorial series. 
  I added the "start" : "node app.js" and node engine version in the package.json file. In my .gitignore, I only have node_modules/ . I cant really seem to find the problem here.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;True Heart&lt;/title&gt;
    &lt;base href="/"&gt;
  
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"&gt;
    &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"&gt;&lt;/script&gt;
    &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"&gt;&lt;/script&gt;
    &lt;link rel="icon" type="image/x-icon" href="favicon.ico"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;app-root&gt;&lt;/app-root&gt;
  &lt;script type="text/javascript" src="runtime.js"&gt;&lt;/script&gt;&lt;script type="text/javascript" src="polyfills.js"&gt;&lt;/script&gt;&lt;script type="text/javascript" src="styles.js"&gt;&lt;/script&gt;&lt;script type="text/javascript" src="vendor.js"&gt;&lt;/script&gt;&lt;script type="text/javascript" src="main.js"&gt;&lt;/script&gt;&lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>THis is the heroku build log</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Counting objects: 4, done.
  Delta compression using up to 4 threads.
  Compressing objects: 100% (4/4), done.
  Writing objects: 100% (4/4), 353 bytes | 353.00 KiB/s, done.
  Total 4 (delta 3), reused 0 (delta 0)
  remote: Compressing source files... done.
  remote: Building source:
  remote: 
  remote: -----&gt; Node.js app detected
  remote: 
  remote: -----&gt; Creating runtime environment
  remote:        
  remote:        NPM_CONFIG_LOGLEVEL=error
  remote:        NODE_VERBOSE=false
  remote:        NODE_ENV=production
  remote:        NODE_MODULES_CACHE=true
  remote: 
  remote: -----&gt; Installing binaries
  remote:        engines.node (package.json):  10.4.1
  remote:        engines.npm (package.json):   unspecified (use default)
  remote:        
  remote:        Resolving node version 10.4.1...
  remote:        Downloading and installing node 10.4.1...
  remote:        Using default npm version: 6.1.0
  remote: 
  remote: -----&gt; Restoring cache
  remote:        Loading 2 from cacheDirectories (default):
  remote:        - node_modules
  remote:        - bower_components (not cached - skipping)
  remote: 
  remote: -----&gt; Building dependencies
  remote:        Installing node modules (package.json + package-lock)
  remote:        audited 1583 packages in 3.755s
  remote:        found 2 high severity vulnerabilities
  remote:        run `npm audit fix` to fix them, or `npm audit` for details
  remote: 
  remote: -----&gt; Caching build
  remote:        Clearing previous node cache
  remote:        Saving 2 cacheDirectories (default):
  remote:        - node_modules
  remote:        - bower_components (nothing to cache)
  remote: 
  remote: -----&gt; Pruning devDependencies
  remote:        audited 1583 packages in 3.408s
  remote:        found 2 high severity vulnerabilities
  remote:        run `npm audit fix` to fix them, or `npm audit` for details
  remote: 
  remote: -----&gt; Build succeeded!
  remote: -----&gt; Discovering process types
  remote:        Procfile declares types     -&gt; (none)
  remote:        Default types for buildpack -&gt; web
  remote: 
  remote: -----&gt; Compressing...
  remote:        Done: 22.9M
  remote: -----&gt; Launching...
  remote:        Released v13
  remote:        https://mighty-eyrie-74454.herokuapp.com/ deployed to Heroku
  remote: 
  remote: Verifying deploy... done.
  To https://git.heroku.com/mighty-eyrie-74454.git
     c34df49..29a6890  master -&gt; master</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help?</p>