title: AWS CodeBuild YAML for Angular
body: <p>I'm trying to deploy an angular app from github to elastic beanstalk using code pipeline.</p>
  
  <p>This is my simple yml:</p>
  
  <pre><code>version: 0.2
  
  phases:
    install:
      runtime-versions:
        nodejs: 10
      commands:
        - echo Installing angular cli...
        - npm install -g @angular/cli
  build:
    commands:
      - echo Build started...
      - ng build --prod
  
  artifacts:
    files:
      - dist/
  </code></pre>
  
  <p>And the error stack:</p>
  
  <pre><code>[Container] 2019/06/28 10:44:26 Waiting for agent ping 
  [Container] 2019/06/28 10:44:29 Waiting for DOWNLOAD_SOURCE 
  [Container] 2019/06/28 10:44:30 Phase is DOWNLOAD_SOURCE 
  [Container] 2019/06/28 10:44:30 CODEBUILD_SRC_DIR=/codebuild/output/src628764845/src 
  [Container] 2019/06/28 10:44:30 YAML location is /codebuild/output/src628764845/src/buildspec.yml 
  [Container] 2019/06/28 10:44:30 Processing environment variables 
  [Container] 2019/06/28 10:44:30 Moving to directory /codebuild/output/src628764845/src 
  [Container] 2019/06/28 10:44:30 Registering with agent 
  [Container] 2019/06/28 10:44:30 Phases found in YAML: 1 
  [Container] 2019/06/28 10:44:30  INSTALL: 2 commands 
  [Container] 2019/06/28 10:44:30 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED 
  [Container] 2019/06/28 10:44:30 Phase context status code:  Message:  
  [Container] 2019/06/28 10:44:30 Entering phase INSTALL 
  [Container] 2019/06/28 10:44:30 Running command echo "Installing Node.js version 10 ..." 
  Installing Node.js version 10 ... 
  
  [Container] 2019/06/28 10:44:30 Running command n 10.16.0 
  
  [Container] 2019/06/28 10:44:31 Running command echo Installing angular cli... 
  Installing angular cli... 
  
  [Container] 2019/06/28 10:44:31 Running command npm install -g @angular/cli 
  /usr/local/bin/ng -&gt; /usr/local/lib/node_modules/@angular/cli/bin/ng 
  
  &gt; @angular/cli@8.0.6 postinstall /usr/local/lib/node_modules/@angular/cli 
  &gt; node ./bin/postinstall/script.js 
  
  + @angular/cli@8.0.6 
  added 228 packages from 175 contributors in 10.074s 
  
  [Container] 2019/06/28 10:44:42 Phase complete: INSTALL State: SUCCEEDED 
  [Container] 2019/06/28 10:44:42 Phase context status code:  Message:  
  [Container] 2019/06/28 10:44:42 Entering phase PRE_BUILD 
  [Container] 2019/06/28 10:44:42 Phase complete: PRE_BUILD State: SUCCEEDED 
  [Container] 2019/06/28 10:44:42 Phase context status code:  Message:  
  [Container] 2019/06/28 10:44:42 Entering phase BUILD 
  [Container] 2019/06/28 10:44:42 Phase complete: BUILD State: SUCCEEDED 
  [Container] 2019/06/28 10:44:42 Phase context status code:  Message:  
  [Container] 2019/06/28 10:44:42 Entering phase POST_BUILD 
  [Container] 2019/06/28 10:44:42 Phase complete: POST_BUILD State: SUCCEEDED 
  [Container] 2019/06/28 10:44:42 Phase context status code:  Message:  
  [Container] 2019/06/28 10:44:42 Expanding base directory path: . 
  [Container] 2019/06/28 10:44:42 Assembling file list 
  [Container] 2019/06/28 10:44:42 Expanding . 
  [Container] 2019/06/28 10:44:42 Expanding artifact file paths for base directory . 
  [Container] 2019/06/28 10:44:42 Assembling file list 
  [Container] 2019/06/28 10:44:42 Expanding dist/ 
  [Container] 2019/06/28 10:44:42 Skipping invalid artifact path dist/ 
  [Container] 2019/06/28 10:44:42 Phase complete: UPLOAD_ARTIFACTS State: FAILED 
  [Container] 2019/06/28 10:44:42 Phase context status code: CLIENT_ERROR Message: no matching artifact paths found 
  </code></pre>
  
  <p>Supposedly the compiled source is in <code>dist</code>, but it can't seem to find it... Advice?</p>