title: How to solve Eslint error while deploying Full-Stack app to Heroku?
body: <p>I want to deploy React/Express app in Heroku. The project is in one folder and has only one <strong>.git</strong>. Client folder is in the <strong>root</strong>. I was following to <a href="https://www.newline.co/fullstack-react/articles/deploying-a-react-app-with-a-server/?fbclid=IwAR375l_CTCoQx5z12iAqQ-hUqNRCVqqtAP0VXcd8rTQ7Go_bhSuwYaUzhh8" rel="nofollow noreferrer">this tutorial</a> , but encountered an error with Eslint, while running the command.</p>
  <pre><code>git push heroku master
  </code></pre>
  <p>Here is the error</p>
  <pre><code>ESLint: 6.8.0.
  remote: 
  remote: ESLint couldn't find the config &quot;react-app&quot; to extend from. Please check that the name of the config is correct.
  remote: 
  remote: The config &quot;react-app&quot; was referenced from the config file in &quot;/tmp/build_72772b34/client/.eslintrc.json&quot;.
  remote: 
  remote: If you still have problems, please stop by https://gitter.im/eslint/eslint to chat with the team.
  remote: 
  remote: npm ERR! code ELIFECYCLE
  remote: npm ERR! errno 2
  remote: npm ERR! express-typescript-starter@0.1.0 lint: `tsc --noEmit &amp;&amp; eslint &quot;**/*.{js,ts}&quot; --quiet --fix`
  remote: npm ERR! Exit status 2
  remote: npm ERR! 
  remote: npm ERR! Failed at the express-typescript-starter@0.1.0 lint script.
  remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  </code></pre>
  <p>I tried to install <strong>Eslint</strong> globally, removed and reinstalled <strong>node_modules</strong>, changed <strong>eslintrcjson</strong> but can't get rid of this error. <br>
  It says that <strong>config react-app</strong> which is in <strong>eslintrc.json</strong> is not correct. I have the same <strong>eslintrc.json</strong> file both in server and client side as well.
  Also I removed <strong>.eslintrc</strong> file according to <a href="https://stackoverflow.com/questions/60431931/eslint-error-eslint-couldnt-find-the-config-react-app">this answer</a> since I have installed and have in <strong>package.json</strong>. Correct me, please, if I am wrong.
  Any help will be appreciated.<br>
  Client/eslintrc.json file</p>
  <pre><code>{
    &quot;extends&quot;: [&quot;react-app&quot;, &quot;plugin:jsx-a11y/recommended&quot;],
    &quot;plugins&quot;: [&quot;jsx-a11y&quot;, &quot;react&quot;],
    &quot;rules&quot; : {
       &quot;indent&quot;: [&quot;error&quot;, 2],
       &quot;no-unused-vars&quot;: [&quot;error&quot;],
       &quot;react/jsx-uses-react&quot;: &quot;error&quot;,   
       &quot;react/jsx-uses-vars&quot;: &quot;error&quot;
     }
  }
  </code></pre>
  <p>Client/package.json</p>
  <pre><code>{
    &quot;name&quot;: &quot;fast-track-typescript-redux-template&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@artsy/fresnel&quot;: &quot;^1.2.2&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;^4.2.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^9.3.2&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^7.1.2&quot;,
      &quot;@types/jest&quot;: &quot;^24.0.0&quot;,
      &quot;@types/node&quot;: &quot;^12.0.0&quot;,
      &quot;@types/react&quot;: &quot;^16.9.0&quot;,
      &quot;@types/react-dom&quot;: &quot;^16.9.0&quot;,
      &quot;@types/react-redux&quot;: &quot;^7.1.7&quot;,
      &quot;@types/react-router-dom&quot;: &quot;^5.1.3&quot;,
      &quot;@types/redux-saga&quot;: &quot;^0.10.5&quot;,
      &quot;@types/redux-thunk&quot;: &quot;^2.1.0&quot;,
      &quot;@types/semantic-ui&quot;: &quot;^2.2.7&quot;,
      &quot;@types/styled-components&quot;: &quot;^5.1.4&quot;,
      &quot;axios&quot;: &quot;^0.20.0&quot;,
      &quot;eslint-config-react-app&quot;: &quot;^6.0.0&quot;,
      &quot;formik&quot;: &quot;^2.2.0&quot;,
      &quot;react&quot;: &quot;^16.12.0&quot;,
      &quot;react-bootstrap&quot;: &quot;^1.0.1&quot;,
      &quot;react-cookie&quot;: &quot;^4.0.3&quot;,
      &quot;react-dom&quot;: &quot;^16.12.0&quot;,
      &quot;react-hook-form&quot;: &quot;^6.11.4&quot;,
      &quot;react-redux&quot;: &quot;^7.1.3&quot;,
      &quot;react-router-dom&quot;: &quot;^5.1.2&quot;,
      &quot;react-scripts&quot;: &quot;^3.4.0&quot;,
      &quot;react-select&quot;: &quot;^3.1.0&quot;,
      &quot;redux&quot;: &quot;^4.0.5&quot;,
      &quot;redux-devtools-extension&quot;: &quot;^2.13.8&quot;,
      &quot;redux-saga&quot;: &quot;^1.1.3&quot;,
      &quot;redux-thunk&quot;: &quot;^2.3.0&quot;,
      &quot;semantic-ui-css&quot;: &quot;^2.4.1&quot;,
      &quot;semantic-ui-react&quot;: &quot;^2.0.0&quot;,
      &quot;styled-components&quot;: &quot;^5.2.0&quot;,
      &quot;typescript&quot;: &quot;^3.9.7&quot;,
      &quot;yup&quot;: &quot;^0.29.3&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;,
      &quot;lint&quot;: &quot;eslint --debug 'src/**/*.{js,jsx,ts,tsx}'&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: &quot;react-app&quot;
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    },
    &quot;devDependencies&quot;: {
      &quot;@types/yup&quot;: &quot;^0.29.8&quot;,
      &quot;husky&quot;: &quot;^4.2.3&quot;,
      &quot;lint-staged&quot;: &quot;^10.0.7&quot;
    },
    &quot;husky&quot;: {
      &quot;hooks&quot;: {
        &quot;pre-commit&quot;: &quot;lint-staged&quot;
      }
    },
    &quot;lint-staged&quot;: {
      &quot;./src/**/*.{js,jsx,ts,tsx}&quot;: [
        &quot;npx prettier --write&quot;,
        &quot;eslint --fix&quot;
      ]
    }
  }
  </code></pre>
  <p>server.ts</p>
  <pre><code>import express from 'express'
  import path from 'path'
  import errorHandler from 'errorhandler'
  
  import app from './app'
  
  app.use(errorHandler())
  
  if (process.env.NODE_ENV === 'production') {
    app.use(express.static('client/build'))
  
    app.get('*', (req, res) =&gt; {
      res.sendFile(path.resolve(__dirname, 'build', 'index.html'))
    })
  }
  
  const server = app.listen(app.get('port'), () =&gt; {
    console.log(
      '  App is running at http://localhost:%d in %s mode',
      app.get('port'),
      app.get('env')
    )
  })
  
  export default server
  </code></pre>
  <p>package.json in server</p>
  <pre><code>{
    &quot;name&quot;: &quot;express-typescript-starter&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;description&quot;: &quot;A starting point for Node.js express apps with TypeScript&quot;,
    &quot;repository&quot;: {
      &quot;type&quot;: &quot;git&quot;,
      &quot;url&quot;: &quot;https://github.com/Microsoft/TypeScript-Node-Starter&quot;
    },
    &quot;author&quot;: &quot;Bowden Kelly&quot;,
    &quot;license&quot;: &quot;MIT&quot;,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;npm run serve&quot;,
      &quot;build&quot;: &quot;npm run build-sass &amp;&amp; npm run build-ts &amp;&amp; npm run lint &amp;&amp; npm run copy-static-assets&quot;,
      &quot;serve&quot;: &quot;node dist/server.js&quot;,
      &quot;watch-node&quot;: &quot;nodemon src/server.ts&quot;,
      &quot;watch&quot;: &quot;concurrently -k -p \&quot;[{name}]\&quot; -n \&quot;Sass,TypeScript,Node\&quot; -c \&quot;yellow.bold,cyan.bold,green.bold\&quot; \&quot;npm run watch-ts\&quot; \&quot;npm run watch-node\&quot;&quot;,
      &quot;test&quot;: &quot;jest --forceExit --coverage --verbose false&quot;,
      &quot;watch-test&quot;: &quot;npm run test -- --watchAll&quot;,
      &quot;build-ts&quot;: &quot;tsc&quot;,
      &quot;watch-ts&quot;: &quot;tsc -w&quot;,
      &quot;lint&quot;: &quot;eslint --debug 'src/**/*.{js,jsx,ts,tsx}'&quot;,
      &quot;copy-static-assets&quot;: &quot;ts-node copyStaticAssets.ts&quot;,
      &quot;debug&quot;: &quot;npm run build &amp;&amp; npm run watch-debug&quot;,
      &quot;serve-debug&quot;: &quot;nodemon --inspect dist/server.js&quot;,
      &quot;watch-debug&quot;: &quot;concurrently -k -p \&quot;[{name}]\&quot; -n \&quot;Sass,TypeScript,Node\&quot; -c \&quot;yellow.bold,cyan.bold,green.bold\&quot; \&quot;npm run watch-ts\&quot; \&quot;npm run serve-debug\&quot;&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@sendgrid/mail&quot;: &quot;^7.2.6&quot;,
      &quot;@types/bcrypt&quot;: &quot;^3.0.0&quot;,
      &quot;@types/cors&quot;: &quot;^2.8.7&quot;,
      &quot;@types/jsonwebtoken&quot;: &quot;^8.3.7&quot;,
      &quot;@types/mailgun-js&quot;: &quot;^0.22.11&quot;,
      &quot;async&quot;: &quot;^3.2.0&quot;,
      &quot;bcrypt&quot;: &quot;^5.0.0&quot;,
      &quot;bcrypt-nodejs&quot;: &quot;^0.0.3&quot;,
      &quot;bluebird&quot;: &quot;^3.7.2&quot;,
      &quot;body-parser&quot;: &quot;^1.19.0&quot;,
      &quot;compression&quot;: &quot;^1.7.4&quot;,
      &quot;connect-mongo&quot;: &quot;^3.2.0&quot;,
      &quot;cors&quot;: &quot;^2.8.5&quot;,
      &quot;dotenv&quot;: &quot;^8.2.0&quot;,
      &quot;errorhandler&quot;: &quot;^1.5.1&quot;,
      &quot;eslint-config-react-app&quot;: &quot;^6.0.0&quot;,
      &quot;express&quot;: &quot;^4.17.1&quot;,
      &quot;express-flash&quot;: &quot;0.0.2&quot;,
      &quot;express-session&quot;: &quot;^1.17.0&quot;,
      &quot;express-validator&quot;: &quot;^6.4.0&quot;,
      &quot;fbgraph&quot;: &quot;^1.4.4&quot;,
      &quot;husky&quot;: &quot;^4.2.3&quot;,
      &quot;jsonwebtoken&quot;: &quot;^8.5.1&quot;,
      &quot;lint-staged&quot;: &quot;^10.0.8&quot;,
      &quot;lodash&quot;: &quot;^4.17.20&quot;,
      &quot;lusca&quot;: &quot;^1.6.1&quot;,
      &quot;mailgen&quot;: &quot;^2.0.14&quot;,
      &quot;mailgun-js&quot;: &quot;^0.22.0&quot;,
      &quot;mongodb-memory-server&quot;: &quot;^6.3.1&quot;,
      &quot;mongoose&quot;: &quot;^5.9.2&quot;,
      &quot;mongoose-bcrypt&quot;: &quot;^1.9.0&quot;,
      &quot;nodemailer&quot;: &quot;^6.4.3&quot;,
      &quot;passport&quot;: &quot;^0.4.1&quot;,
      &quot;passport-facebook&quot;: &quot;^3.0.0&quot;,
      &quot;passport-local&quot;: &quot;^1.0.0&quot;,
      &quot;pug&quot;: &quot;^2.0.4&quot;,
      &quot;request&quot;: &quot;^2.88.2&quot;,
      &quot;request-promise&quot;: &quot;^4.2.5&quot;,
      &quot;winston&quot;: &quot;^3.2.1&quot;,
      &quot;yup&quot;: &quot;^0.29.3&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@types/async&quot;: &quot;^3.0.8&quot;,
      &quot;@types/bcrypt-nodejs&quot;: &quot;^0.0.30&quot;,
      &quot;@types/bluebird&quot;: &quot;^3.5.29&quot;,
      &quot;@types/body-parser&quot;: &quot;^1.19.0&quot;,
      &quot;@types/chai&quot;: &quot;^4.2.9&quot;,
      &quot;@types/compression&quot;: &quot;^1.7.0&quot;,
      &quot;@types/concurrently&quot;: &quot;^4.1.1&quot;,
      &quot;@types/connect-mongo&quot;: &quot;^3.1.3&quot;,
      &quot;@types/errorhandler&quot;: &quot;^0.0.32&quot;,
      &quot;@types/eslint&quot;: &quot;^6.1.8&quot;,
      &quot;@types/express&quot;: &quot;^4.17.2&quot;,
      &quot;@types/express-flash&quot;: &quot;0.0.1&quot;,
      &quot;@types/express-session&quot;: &quot;^1.15.16&quot;,
      &quot;@types/jest&quot;: &quot;^24.9.1&quot;,
      &quot;@types/jquery&quot;: &quot;^3.3.33&quot;,
      &quot;@types/lodash&quot;: &quot;^4.14.149&quot;,
      &quot;@types/lusca&quot;: &quot;^1.6.1&quot;,
      &quot;@types/mongoose&quot;: &quot;^5.7.2&quot;,
      &quot;@types/node&quot;: &quot;^12.12.28&quot;,
      &quot;@types/node-sass&quot;: &quot;^4.11.0&quot;,
      &quot;@types/nodemailer&quot;: &quot;^6.4.0&quot;,
      &quot;@types/passport&quot;: &quot;^1.0.2&quot;,
      &quot;@types/passport-facebook&quot;: &quot;^2.1.9&quot;,
      &quot;@types/passport-local&quot;: &quot;^1.0.33&quot;,
      &quot;@types/pug&quot;: &quot;^2.0.4&quot;,
      &quot;@types/request&quot;: &quot;^2.48.4&quot;,
      &quot;@types/request-promise&quot;: &quot;^4.1.45&quot;,
      &quot;@types/shelljs&quot;: &quot;^0.8.6&quot;,
      &quot;@types/supertest&quot;: &quot;^2.0.8&quot;,
      &quot;@types/winston&quot;: &quot;^2.4.4&quot;,
      &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^2.21.0&quot;,
      &quot;@typescript-eslint/parser&quot;: &quot;^2.21.0&quot;,
      &quot;chai&quot;: &quot;^4.2.0&quot;,
      &quot;concurrently&quot;: &quot;^5.1.0&quot;,
      &quot;eslint&quot;: &quot;^6.8.0&quot;,
      &quot;jest&quot;: &quot;^24.9.0&quot;,
      &quot;node-sass&quot;: &quot;^4.13.1&quot;,
      &quot;nodemon&quot;: &quot;^1.19.4&quot;,
      &quot;shelljs&quot;: &quot;^0.8.3&quot;,
      &quot;supertest&quot;: &quot;^4.0.2&quot;,
      &quot;ts-jest&quot;: &quot;^24.3.0&quot;,
      &quot;ts-node&quot;: &quot;^8.6.2&quot;,
      &quot;typescript&quot;: &quot;^3.9.7&quot;
    },
    &quot;husky&quot;: {
      &quot;hooks&quot;: {
        &quot;pre-commit&quot;: &quot;lint-staged&quot;
      }
    },
    &quot;lint-staged&quot;: {
      &quot;./src/**/*.{js,jsx,ts,tsx}&quot;: [
        &quot;npx prettier --write&quot;,
        &quot;eslint --fix&quot;
      ]
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: &quot;react-app&quot;
    },
    &quot;jest&quot;: {
      &quot;testEnvironment&quot;: &quot;node&quot;,
      &quot;runInBand&quot;: true
    }
  }
  </code></pre>