title: React + Typescript error on build in node_modules/jest-diff/build/diffLines.d.ts
body: <p>i am currently working on a project that uses React and Typescript that was working just fine until lately where the following error happened when building using Jenkins (and the error appears too in intellij on my computer). It seems that a module as a compilation error.</p>
  <pre><code>[INFO] Creating an optimized production build...
  [INFO] Failed to compile.
  [INFO] 
  [INFO] /jenkins/workspace/project/front/node_modules/jest-diff/build/diffLines.d.ts
  [INFO] TypeScript error in /jenkins/workspace/project/front/node_modules/jest-diff/build/diffLines.d.ts(8,13):
  [INFO] '=' expected.  TS1005
  [INFO] 
  [INFO]      6 |  */
  [INFO]      7 | import { Diff } from './cleanupSemantic';
  [INFO]   &gt;  8 | import type { DiffOptions } from './types';
  [INFO]        |             ^
  [INFO]      9 | export declare const diffLinesUnified: (aLines: string[], bLines: string[], options?: DiffOptions | undefined) =&gt; string;
  [INFO]     10 | export declare const diffLinesUnified2: (aLinesDisplay: string[], bLinesDisplay: string[], aLinesCompare: string[], bLinesCompare: string[], options?: DiffOptions | undefined) =&gt; string;
  [INFO]     11 | export declare const diffLinesRaw: (aLines: string[], bLines: string[]) =&gt; Diff[];
  </code></pre>
  <p>I am a bit lost here, so anyone has any clue to solve this problem ? Thanks in advance.</p>
  <p>Here is my package.json file</p>
  <pre><code>{
    &quot;name&quot;: &quot;front&quot;,
    &quot;version&quot;: &quot;1.0.0-SNAPSHOT&quot;,
    &quot;private&quot;: true,
    &quot;homepage&quot;: &quot;./&quot;,
    &quot;dependencies&quot;: {
      &quot;@types/echarts&quot;: &quot;4.1.11&quot;,
      &quot;@types/jest&quot;: &quot;24.0.15&quot;,
      &quot;@types/node&quot;: &quot;12.6.3&quot;,
      &quot;@types/react&quot;: &quot;16.8.23&quot;,
      &quot;@types/react-dom&quot;: &quot;16.8.4&quot;,
      &quot;antd&quot;: &quot;3.20.3&quot;,
      &quot;axios&quot;: &quot;0.19.0&quot;,
      &quot;classnames&quot;: &quot;2.2.6&quot;,
      &quot;connected-react-router&quot;: &quot;6.3.1&quot;,
      &quot;css-element-queries&quot;: &quot;1.2.1&quot;,
      &quot;echarts&quot;: &quot;4.2.1&quot;,
      &quot;jsonwebtoken&quot;: &quot;8.5.1&quot;,
      &quot;rc-texty&quot;: &quot;0.2.0&quot;,
      &quot;rc-tween-one&quot;: &quot;2.6.3&quot;,
      &quot;react&quot;: &quot;16.8.6&quot;,
      &quot;react-compound-slider&quot;: &quot;2.2.0&quot;,
      &quot;react-dom&quot;: &quot;16.8.6&quot;,
      &quot;react-redux&quot;: &quot;7.1.0&quot;,
      &quot;react-router&quot;: &quot;4.4.0-beta.7&quot;,
      &quot;react-router-config&quot;: &quot;5.0.0&quot;,
      &quot;react-router-dom&quot;: &quot;4.4.0-beta.7&quot;,
      &quot;react-scripts&quot;: &quot;3.3.0&quot;,
      &quot;redux&quot;: &quot;4.0.4&quot;,
      &quot;redux-logger&quot;: &quot;3.0.6&quot;,
      &quot;reflect-metadata&quot;: &quot;0.1.13&quot;,
      &quot;tailwindcss&quot;: &quot;1.1.2&quot;,
      &quot;typescript&quot;: &quot;3.5.3&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-app-rewired start&quot;,
      &quot;build&quot;: &quot;react-app-rewired build&quot;,
      &quot;test&quot;: &quot;react-app-rewired test --env=jsdom --watchAll=false&quot;,
      &quot;test:watch&quot;: &quot;react-app-rewired test --env=jsdom&quot;,
      &quot;lint:ts&quot;: &quot;eslint ./src/**/*.{ts,tsx}&quot;,
      &quot;lint:ts:errors&quot;: &quot;eslint ./src/**/*.{ts,tsx} --quiet&quot;,
      &quot;lint:ts:fix&quot;: &quot;eslint ./src/**/*.{ts,tsx} --fix&quot;,
      &quot;madge&quot;: &quot;madge --circular --extensions ts ./src/&quot;,
      &quot;lint:scss&quot;: &quot;stylelint ./src/**/*.scss --syntax scss&quot;,
      &quot;lint:scss:fix&quot;: &quot;stylelint ./src/**/*.scss --syntax scss --fix&quot;
    },
    &quot;lint-staged&quot;: {
      &quot;*.ts&quot;: &quot;npm run lint:ts:errors&quot;,
      &quot;*.tsx&quot;: &quot;npm run lint:ts:errors&quot;
    },
    &quot;husky&quot;: {
      &quot;hooks&quot;: {
        &quot;pre-commit&quot;: &quot;lint-staged&quot;
      }
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: &quot;react-app&quot;
    },
    &quot;jest&quot;: {
      &quot;moduleNameMapper&quot;: {
        &quot;^@/(.*)$&quot;: &quot;&lt;rootDir&gt;/src/$1&quot;
      }
    },
    &quot;browserslist&quot;: [
      &quot;&gt;0.2%&quot;,
      &quot;ie 11&quot;
    ],
    &quot;devDependencies&quot;: {
      &quot;@babel/parser&quot;: &quot;7.5.0&quot;,
      &quot;@types/classnames&quot;: &quot;2.2.9&quot;,
      &quot;@types/enzyme&quot;: &quot;3.9.1&quot;,
      &quot;@types/enzyme-adapter-react-16&quot;: &quot;1.0.5&quot;,
      &quot;@types/file-saver&quot;: &quot;2.0.1&quot;,
      &quot;@types/jsonwebtoken&quot;: &quot;8.3.2&quot;,
      &quot;@types/react-redux&quot;: &quot;7.1.1&quot;,
      &quot;@types/react-router&quot;: &quot;4.4.4&quot;,
      &quot;@types/react-router-config&quot;: &quot;1.1.2&quot;,
      &quot;@types/react-router-dom&quot;: &quot;4.3.1&quot;,
      &quot;@types/redux-logger&quot;: &quot;3.0.7&quot;,
      &quot;awesome-typescript-loader&quot;: &quot;5.2.1&quot;,
      &quot;babel-plugin-import&quot;: &quot;1.11.0&quot;,
      &quot;cross-env&quot;: &quot;5.2.0&quot;,
      &quot;customize-cra&quot;: &quot;0.2.12&quot;,
      &quot;enzyme&quot;: &quot;3.9.0&quot;,
      &quot;enzyme-adapter-react-16&quot;: &quot;1.12.1&quot;,
      &quot;file-saver&quot;: &quot;2.0.1&quot;,
      &quot;husky&quot;: &quot;3.0.5&quot;,
      &quot;jest-enzyme&quot;: &quot;7.0.2&quot;,
      &quot;less&quot;: &quot;3.9.0&quot;,
      &quot;less-loader&quot;: &quot;5.0.0&quot;,
      &quot;lint-staged&quot;: &quot;9.2.5&quot;,
      &quot;madge&quot;: &quot;3.4.4&quot;,
      &quot;node-sass&quot;: &quot;4.12.0&quot;,
      &quot;prettier&quot;: &quot;1.18.2&quot;,
      &quot;react-app-polyfill&quot;: &quot;1.0.1&quot;,
      &quot;react-app-rewire-postcss&quot;: &quot;3.0.2&quot;,
      &quot;react-app-rewired&quot;: &quot;2.1.3&quot;,
      &quot;scss-to-json&quot;: &quot;2.0.0&quot;,
      &quot;stylelint&quot;: &quot;11.0.0&quot;,
      &quot;stylelint-config-recommended-scss&quot;: &quot;4.0.0&quot;,
      &quot;stylelint-config-standard&quot;: &quot;19.0.0&quot;,
      &quot;stylelint-scss&quot;: &quot;3.11.1&quot;
    },
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;&gt;=8&quot;
    }
  }
  </code></pre>