title: MERN Stack push to heroku: ! [remote rejected] master -> master (pre-receive hook declined)
body: <p>Side note: I've used this same method for deployment about 3 times and now all of the sudden it's not working... Makes me think that something just updated with heroku??? IDK</p>
  
  <p>Trying to push my MERN Stack application to heroku but I'm getting an error, here is my package.json file:</p>
  
  <pre><code>{
    "name": "jordanwebsite",
    "version": "1.0.0",
    "description": "",
    "main": "server.js",
    "scripts": {
      "start": "node server.js",
      "server": "nodemon server.js",
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1",
      "client-install": "npm install --prefix client",
      "client": "npm start --prefix client",
      "dev": "concurrently \"npm run server\" \"npm run\tclient\"",
      "heroku-postbuild": "cd client &amp;&amp; NPM_CONFIG_PRODUCTION=false npm install &amp;&amp; npm run build"
    },
    "author": "Jordan Harris",
    "license": "ISC",
    "dependencies": {
      "axios": "^0.18.0",
      "body-parser": "^1.18.3",
      "concurrently": "^4.1.0",
      "express": "^4.16.4",
      "nodemon": "^1.18.9"
    }
  }
  </code></pre>
  
  <p>Here are the logs: </p>
  
  <pre><code>$ git push heroku master
  Enumerating objects: 40, done.
  Counting objects: 100% (40/40), done.
  Delta compression using up to 8 threads
  Compressing objects: 100% (38/38), done.
  Writing objects: 100% (40/40), 2.39 MiB | 637.00 KiB/s, done.
  Total 40 (delta 0), 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_ENV=production
  remote:        NODE_MODULES_CACHE=true
  remote:        NODE_VERBOSE=false
  remote:
  remote: -----&gt; Installing binaries
  remote:        engines.node (package.json):  unspecified
  remote:        engines.npm (package.json):   unspecified (use default)
  remote:
  remote:        Resolving node version 10.x...
  remote:        Downloading and installing node 10.15.1...
  remote:        Using default npm version: 6.4.1
  remote:
  remote: -----&gt; Building dependencies
  remote:        Installing node modules (package.json)
  remote:
  remote:        &gt; nodemon@1.18.9 postinstall /tmp/build_1c67c2822e7364298c69e79a4318103a/node_modules/nodemon
  remote:        &gt; node bin/postinstall || exit 0
  remote:
  remote:        Love nodemon? You can now support the project via the open collective:
  remote:         &gt; https://opencollective.com/nodemon/donate
  remote:
  remote:        added 340 packages from 197 contributors and audited 2497 packages in
  10.466s
  remote:        found 0 vulnerabilities
  remote:
  remote:        Running heroku-postbuild
  remote:
  remote:        &gt; jordanwebsite@1.0.0 heroku-postbuild /tmp/build_1c67c2822e7364298c69e79a4318103a
  remote:        &gt; cd client &amp;&amp; NPM_CONFIG_PRODUCTION=false npm install &amp;&amp; npm run build
  remote:
  remote:        added 1963 packages from 688 contributors and audited 35917 packages in 45.094s
  remote:        found 0 vulnerabilities
  remote:
  remote:
  remote:        &gt; client@0.1.0 build /tmp/build_1c67c2822e7364298c69e79a4318103a/client
  remote:        &gt; react-scripts build
  remote:
  remote:        Creating an optimized production build...
  remote:        Failed to compile.
  remote:
  remote:        Failed to minify the bundle. Error: static/js/main.4d56311f.chunk.js from Terser
  remote:        TypeError: Cannot read property 'minify' of undefined
  remote:            at compiler.run (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/react-scripts/scripts/build.js:169:23)
  remote:            at finalCallback (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:210:39)
  remote:            at hooks.done.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:226:13)
  remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), &lt;anonymous&gt;:6:1)
  remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
  remote:            at onCompiled (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:224:21)
  remote:            at hooks.afterCompile.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:553:14)
  remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), &lt;anonymous&gt;:6:1)
  remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
  remote:            at compilation.seal.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compiler.js:550:30)
  remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), &lt;anonymous&gt;:6:1)
  remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
  remote:            at hooks.optimizeAssets.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compilation.js:1295:35)
  remote:            at AsyncSeriesHook.eval [as callAsync] (eval at create (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/HookCodeFactory.js:32:10), &lt;anonymous&gt;:6:1)
  remote:            at AsyncSeriesHook.lazyCompileHook (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/tapable/lib/Hook.js:154:20)
  remote:            at hooks.optimizeChunkAssets.callAsync.err (/tmp/build_1c67c2822e7364298c69e79a4318103a/client/node_modules/webpack/lib/Compilation.js:1286:32)
  remote:
  remote: npm ERR! code ELIFECYCLE
  remote: npm ERR! errno 1
  remote: npm ERR! client@0.1.0 build: `react-scripts build`
  remote: npm ERR! Exit status 1
  remote: npm ERR!
  remote: npm ERR! Failed at the client@0.1.0 build script.
  remote: npm ERR! This is probably not a problem with npm. There is likely additional
  logging output above.
  remote:
  remote: npm ERR! A complete log of this run can be found in:
  remote: npm ERR!     /tmp/npmcache.tUXJH/_logs/2019-02-03T01_53_57_344Z-debug.log
  remote: npm ERR! code ELIFECYCLE
  remote: npm ERR! errno 1
  remote: npm ERR! jordanwebsite@1.0.0 heroku-postbuild: `cd client &amp;&amp; NPM_CONFIG_PRODUCTION=false npm install &amp;&amp; npm run build`
  remote: npm ERR! Exit status 1
  remote: npm ERR!
  remote: npm ERR! Failed at the jordanwebsite@1.0.0 heroku-postbuild script.
  remote: npm ERR! This is probably not a problem with npm. There is likely additional
  logging output above.
  remote:
  remote: npm ERR! A complete log of this run can be found in:
  remote: npm ERR!     /tmp/npmcache.tUXJH/_logs/2019-02-03T01_53_57_358Z-debug.log
  remote:
  remote: -----&gt; Build failed
  remote:
  remote:        We're sorry this build is failing! You can troubleshoot common issues
  here:
  remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
  remote:
  remote:        Some possible problems:
  remote:
  remote:        - Node version not specified in package.json
  remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
  remote:
  remote:        Love,
  remote:        Heroku
  remote:
  remote:  !     Push rejected, failed to compile Node.js app.
  remote:
  remote:  !     Push failed
  remote: Verifying deploy...
  remote:
  remote: !       Push rejected to jorrharris-website.
  remote:
  To https://git.heroku.com/jorrharris-website.git
   ! [remote rejected] master -&gt; master (pre-receive hook declined)
  error: failed to push some refs to 'https://git.heroku.com/jorrharris-website.git'
  </code></pre>