title: React app Heroku build failed - git push heroku master - Expecting X, Parse error on line 1: got unexpected end of input. Line 1 of which file?
body: <p>I'm getting a very confusing parsing error when I run <code>git push heroku master</code> when trying to build a React app in Heroku that successfully built yesterday.  The only changes since then have been some media queries another contributor added to several  .scss files.</p>
  
  <p>The main error (full build report listed below) reads, 
  <code>
  remote: Failed to compile.
  remote:
  remote: Parse error on line 1: 
  remote: ^
  remote: Expecting "CALC", "LPAREN", "SUB", "NUMBER", "FUNCTION", "LENGTH", "ANGLE", "TIME", "FREQ", "RES", "EMS", "EXS", "CHS", "REMS", "VHS", "VWS", "VMINS", "VMAXS", "PERCENTAGE", "expression", "math_expression", "value", "function", "css_value", got unexpected end of input
  remote: 
  remote: 
  remote: npm ERR! code ELIFECYCLE
  remote: npm ERR! errno 1
  remote: npm ERR! world-of-flags@0.1.0 build:</code>react-scripts build<code>
  remote: npm ERR! Exit status 1</code></p>
  
  <p>The most confusing part of this is that I can't figure out which file this error is referring to when it says <code>Parse error on line 1</code>.  Based on reading this stack overflow question (<a href="https://stackoverflow.com/questions/21966019/git-push-heroku-master-fails-with-parse-error-which-file">git push heroku master fails with parse error - which file?</a>) I assumed the error was referring to my package.json file.  However, I can't find anything wrong with it.  Any help on this would be greatly appreciated.</p>
  
  <p><strong>package.json</strong></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-js lang-js prettyprint-override"><code>{
    "name": "world-of-flags",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
      "dotenv": "^6.2.0",
      "enzyme": "^3.8.0",
      "node-sass": "^4.11.0",
      "prop-types": "^15.6.2",
      "react": "^16.6.3",
      "react-dom": "^16.6.3",
      "react-redux": "^6.0.0",
      "react-router-dom": "^4.3.1",
      "react-scripts": "^2.1.3",
      "redux": "^4.0.1",
      "redux-devtools-extension": "^2.13.7",
      "redux-thunk": "^2.3.0"
    },
    "jest": {
      "collectCoverageFrom": [
        "src/**/*.{js,jsx}",
        "!src/index.js",
        "!src/serviceWorker.js",
        "!src/setupTests.js",
        "!src/history.js",
        "!src/reducers/index.js",
        "!src/mockData/mockData.js",
        "!src/utilities/allCountries.js",
        "!src/utilities/allCountriesImagesObject.js",
        "!src/utilities/allCountriesObjects.js"
      ]
    },
    "scripts": {
      "start": "react-scripts start",
      "build": "react-scripts build",
      "test": "react-scripts test",
      "eject": "react-scripts eject",
      "eslint": "./node_modules/eslint/bin/eslint.js ./src/*.js"
    },
    "eslintConfig": {
      "extends": "react-app"
    },
    "browserslist": [
      "&gt;0.2%",
      "not dead",
      "not ie &lt;= 11",
      "not op_mini all"
    ],
    "devDependencies": {
      "enzyme-adapter-react-16": "^1.7.1",
      "jshint": "^2.9.7",
      "prettier": "1.15.3",
      "resolve-url-loader": "^3.0.0"
    },
    "prettier": {
      "trailingComma": "es5",
      "tabWidth": 2,
      "semi": true,
      "singleQuote": true
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Full Heroku build log</strong></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-js lang-js prettyprint-override"><code>-----&gt; React.js (create-react-app) multi app detected
  -----&gt; Configure create-react-app build environment
         Using `NODE_ENV=development`
  =====&gt; Downloading Buildpack: https://github.com/heroku/heroku-buildpack-multi.git
  =====&gt; Detected Framework: Multipack
  =====&gt; Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
  =====&gt; Detected Framework: Node.js
         
  -----&gt; Creating runtime environment
         
         NPM_CONFIG_LOGLEVEL=error
         NPM_CONFIG_PRODUCTION=false
         NODE_ENV=development
         NODE_MODULES_CACHE=true
         NODE_VERBOSE=false
         
  -----&gt; Installing binaries
         engines.node (package.json):  unspecified
         engines.npm (package.json):   unspecified (use default)
         
         Resolving node version 10.x...
         Downloading and installing node 10.15.0...
         Using default npm version: 6.4.1
         
  -----&gt; Restoring cache
         - node_modules
         
  -----&gt; Building dependencies
         Installing node modules (package.json + package-lock)
         added 212 packages from 12 contributors, removed 4 packages, updated 98 packages and audited 36629 packages in 28.481s
         found 0 vulnerabilities
         
         
  -----&gt; Caching build
         - node_modules
         
  -----&gt; Pruning devDependencies
         Skipping because NODE_ENV is not 'production'
         
  -----&gt; Build succeeded!
  =====&gt; Downloading Buildpack: https://github.com/mars/create-react-app-inner-buildpack.git
  =====&gt; Detected Framework: React.js (create-react-app)
         Writing `static.json` to support create-react-app
         Enabling runtime environment variables
  &gt; world-of-flags@0.1.0 build /tmp/build_768ef9fd4678f7cb022271fe96647f94
  &gt; react-scripts build
  Creating an optimized production build...
  Failed to compile.
  Parse error on line 1: 
  ^
  Expecting "CALC", "LPAREN", "SUB", "NUMBER", "FUNCTION", "LENGTH", "ANGLE", "TIME", "FREQ", "RES", "EMS", "EXS", "CHS", "REMS", "VHS", "VWS", "VMINS", "VMAXS", "PERCENTAGE", "expression", "math_expression", "value", "function", "css_value", got unexpected end of input
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! world-of-flags@0.1.0 build: `react-scripts build`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the world-of-flags@0.1.0 build script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /app/.npm/_logs/2019-01-19T21_04_11_353Z-debug.log
   !     Push rejected, failed to compile React.js (create-react-app) multi app.
   !     Push failed</code></pre>
  </div>
  </div>
  </p>