title: Github action fails build Typescript but in local machine works
body: <p>I'm using Github actions to build and push a docker container to Azure Repository within a react-native-web application. The strange thing is that in my local Windows 10 machine the build process of the react web app works but in Github Action no. It complains about a Typescript error (the application have been written in TS). Being the build process executed in the same dockerized Ubuntu machine, I thought that the result should always be the same but it's not.</p>
  <p>This is my Github action</p>
  <pre><code># This is a basic workflow to help you get started with Actions
  
  name: Publish Web Client prod
  
  # Controls when the action will run. Triggers the workflow on push or pull request
  # events but only for the master branch
  on:
    push:
      branches: publish-web-prod
  
  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  jobs:
    # This workflow contains a single job called &quot;build&quot;
    build:
      # The type of runner that the job will run on
      runs-on: ubuntu-latest
  
      # Steps represent a sequence of tasks that will be executed as part of the job
      steps:
        - name: Checkout
          uses: actions/checkout@v2
        # allow to login to azure registry container
        - name: Login to Azure
          uses: azure/docker-login@v1
          with:
            login-server: registryviatek.azurecr.io
            username: ${{ secrets.REGISTRY_USERNAME }}
            password: ${{ secrets.REGISTRY_PASSWORD }}
  
        # Runs a set of commands using the runners shell
        - name: Run build and publish web prod
          run: |
            docker build -f ${{ github.workspace }}/src/app/DockerfileGithubProd -t registry.azurecr.io/frontendweb-prod:${{ github.sha }} --no-cache .
            docker push registry.azurecr.io/frontendweb-prod:${{ github.sha }}
  </code></pre>
  <p>This is my docker file:</p>
  <pre><code># build environment
  FROM node:14.15.5-alpine as build
  
  RUN apk update
  RUN apk add git
  
  WORKDIR /app
  
  ENV PATH /app/node_modules/.bin:$PATH
  
  COPY src/app/package.json /app/package.json
  
  RUN npm install --silent
  
  RUN npm install react-scripts@3.4.1 -g --silent
  
  COPY src/app /app
  RUN npm run build
  
  # production environment
  FROM nginx:1.17.4-alpine
  COPY --from=build /app/build /usr/share/nginx/html
  RUN rm /etc/nginx/conf.d/default.conf
  COPY src/app/nginx/nginx.conf /etc/nginx/conf.d
  EXPOSE 80
  CMD [&quot;nginx&quot;, &quot;-g&quot;, &quot;daemon off;&quot;]
  </code></pre>
  <p>And this is the outout log from Github:</p>
  <pre><code>Run docker build -f /home/runner/work/App/App/src/app/DockerfileGithubTest -t ***.azurecr.io/frontendweb-test:df0a8964152d2bf50917e59de0af1d2a93e88783 --no-cache .
    docker build -f /home/runner/work/App/App/src/app/DockerfileGithubTest -t ***.azurecr.io/frontendweb-test:df0a8964152d2bf50917e59de0af1d2a93e88783 --no-cache .
    docker push ***.azurecr.io/frontendweb-test:df0a8964152d2bf50917e59de0af1d2a93e88783
    shell: /usr/bin/bash -e {0}
    env:
      DOCKER_CONFIG: /home/runner/work/_temp/docker_login_1617897140374
  Sending build context to Docker daemon  15.17MB
  
  Step 1/16 : FROM node:14.15.5-alpine as build
  14.15.5-alpine: Pulling from library/node
  0a6724ff3fcd: Pulling fs layer
  3b3c21ce1f8c: Pulling fs layer
  560ed84bbbcc: Pulling fs layer
  281a19a6c438: Pulling fs layer
  281a19a6c438: Waiting
  0a6724ff3fcd: Verifying Checksum
  0a6724ff3fcd: Download complete
  281a19a6c438: Verifying Checksum
  281a19a6c438: Download complete
  0a6724ff3fcd: Pull complete
  3b3c21ce1f8c: Verifying Checksum
  3b3c21ce1f8c: Download complete
  560ed84bbbcc: Verifying Checksum
  560ed84bbbcc: Download complete
  3b3c21ce1f8c: Pull complete
  560ed84bbbcc: Pull complete
  281a19a6c438: Pull complete
  Digest: sha256:5edad160011cc8cfb69d990e9ae1cb2681c0f280178241d58eba05b5bfc34047
  Status: Downloaded newer image for node:14.15.5-alpine
   ---&gt; c1babb15a629
  Step 2/16 : RUN apk update
   ---&gt; Running in 25acb5a203e5
  fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
  fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
  v3.11.10-8-gf8ac3999ba [http://dl-cdn.alpinelinux.org/alpine/v3.11/main]
  v3.11.10-2-gc655f5d2f5 [http://dl-cdn.alpinelinux.org/alpine/v3.11/community]
  OK: 11278 distinct packages available
  Removing intermediate container 25acb5a203e5
   ---&gt; 63fdb83b1dfd
  Step 3/16 : RUN apk add git
   ---&gt; Running in 2a8874928a55
  (1/6) Installing ca-certificates (20191127-r2)
  (2/6) Installing nghttp2-libs (1.40.0-r1)
  (3/6) Installing libcurl (7.67.0-r3)
  (4/6) Installing expat (2.2.9-r1)
  (5/6) Installing pcre2 (10.34-r1)
  (6/6) Installing git (2.24.4-r0)
  Executing busybox-1.31.1-r9.trigger
  Executing ca-certificates-20191127-r2.trigger
  OK: 23 MiB in 22 packages
  Removing intermediate container 2a8874928a55
   ---&gt; 5bc04a41d9c2
  Step 4/16 : WORKDIR /app
   ---&gt; Running in d5c9efa1b69a
  Removing intermediate container d5c9efa1b69a
   ---&gt; 5dbe08ad7bbd
  Step 5/16 : ENV PATH /app/node_modules/.bin:$PATH
   ---&gt; Running in e9066449d147
  Removing intermediate container e9066449d147
   ---&gt; 65f6dbf0d570
  Step 6/16 : COPY src/app/package.json /app/package.json
   ---&gt; 073aeb43cf5c
  Step 7/16 : RUN npm install --silent
   ---&gt; Running in 0ef783dd1abb
  Download the file
  Download completed!
  Extract content
  Extract complete!
  Delete the downloaded file
  added 2188 packages from 1166 contributors and audited 2198 packages in 74.182s
  
  100 packages are looking for funding
    run `npm fund` for details
  
  found 9 vulnerabilities (6 low, 3 high)
    run `npm audit fix` to fix them, or `npm audit` for details
  Removing intermediate container 0ef783dd1abb
   ---&gt; b1fbb2e35ceb
  Step 8/16 : RUN npm install react-scripts@3.4.1 -g --silent
   ---&gt; Running in 8d1c76d8f6ab
  /usr/local/bin/react-scripts -&gt; /usr/local/lib/node_modules/react-scripts/bin/react-scripts.js
  + react-scripts@3.4.1
  added 1618 packages from 748 contributors in 43.313s
  Removing intermediate container 8d1c76d8f6ab
   ---&gt; eac5ceccd774
  Step 9/16 : COPY src/app /app
   ---&gt; 5bc1cff62d99
  Step 10/16 : RUN npm run build:test
   ---&gt; Running in 141e7cf15400
  
  &gt; App@0.0.2 build:test /app
  &gt; env-cmd -f .env.staging react-app-rewired build
  
  Creating an optimized production build...
  Failed to compile.
  
  /app/src/features/login/login-form/index.tsx
  TypeScript error in /app/src/features/login/login-form/index.tsx(38,8):
  Type '{ style: { backgroundColor: string; }; icon: string; size: number; color: string; }' is missing the following properties from type 'Pick&lt;Props, &quot;ref&quot; | &quot;style&quot; | &quot;hitSlop&quot; | &quot;onLayout&quot; | &quot;pointerEvents&quot; | &quot;removeClippedSubviews&quot; | &quot;testID&quot; | &quot;nativeID&quot; | &quot;collapsable&quot; | &quot;needsOffscreenAlphaCompositing&quot; | ... 48 more ... | &quot;icon&quot;&gt;': accessibilityComponentType, accessibilityTraits  TS2739
  
      36 |                        &lt;Image source={require('../../../images/header.png')} resizeMode=&quot;center&quot;&gt;&lt;/Image&gt;
      37 | 
    &gt; 38 |                        &lt;Avatar.Icon style={styles.avatarLockIcon} icon=&quot;lock&quot; size={40} color=&quot;white&quot;&gt;&lt;/Avatar.Icon&gt;
         |                         ^
      39 |                        &lt;ViaText type=&quot;title&quot; text=&quot;Accedi&quot; style={styles.avatarLocktxt}&gt;&lt;/ViaText&gt;
      40 |                    &lt;/View&gt;
      41 |
  
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! ViaVoipApp@0.0.2 build:test: `env-cmd -f .env.staging react-app-rewired build`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the ViaVoipApp@0.0.2 build:test 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!     /root/.npm/_logs/2021-04-08T15_56_54_595Z-debug.log
  The command '/bin/sh -c npm run build:test' returned a non-zero code: 1
  
  Error: Process completed with exit code 1.
  </code></pre>
  <p>I know that the error seems right to be raised but if I run <code>npm run build</code> or build the container on my local machine, they works.</p>