title: Yarn Workspaces Not Building Local Dependency
body: <p>I deleted my old question, to provide more info.  I'm using Yarn workspaces (v1.22) on a monorepo with both an Angular app and library. I have the library declared as a dependency of the app.</p>
  <pre><code>root
     |
     ---projects
           |
           ---lib (components)
           |
           ---app
  </code></pre>
  <p>Each project has its associated build scripts. If I run <code>yarn</code> on a fresh checkout at the root or <code>yarn workspace app install</code>, it installs everything and links to the lib's project folder, but it doesn't perform the build, which is necessary, since my tsconfig paths includes the output of the build <code>dist/lib</code>. The last step in the install says &quot;Building Fresh Packages&quot;, but it doesn't trigger the build for the lib for some reason.</p>
  <p>tsconfig.json (base)</p>
  <pre><code>{
    &quot;compileOnSave&quot;: false,
    &quot;compilerOptions&quot;: {
      &quot;baseUrl&quot;: &quot;./&quot;,
      &quot;outDir&quot;: &quot;./dist/out-tsc&quot;,
      &quot;forceConsistentCasingInFileNames&quot;: true,
      &quot;noFallthroughCasesInSwitch&quot;: true,
      &quot;sourceMap&quot;: true,
      &quot;declaration&quot;: false,
      &quot;downlevelIteration&quot;: true,
      &quot;experimentalDecorators&quot;: true,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;importHelpers&quot;: true,
      &quot;target&quot;: &quot;es2015&quot;,
      &quot;module&quot;: &quot;es2020&quot;,
      &quot;lib&quot;: [
        &quot;es2018&quot;,
        &quot;dom&quot;
      ],
      &quot;paths&quot;: {
        &quot;@fabric/components/*&quot;: [
          &quot;./dist/components/*&quot;
        ]
      }
    },
    &quot;angularCompilerOptions&quot;: {
      &quot;strictInjectionParameters&quot;: true,
      &quot;strictInputAccessModifiers&quot;: true,
      &quot;strictTemplates&quot;: true
    }
  }
  </code></pre>
  <p>root package</p>
  <pre><code>{
    &quot;name&quot;: &quot;fabric&quot;,
    &quot;private&quot;: true,
    &quot;license&quot;: &quot;UNLICENSED&quot;,
    &quot;workspaces&quot;: [
      &quot;projects/*&quot;
    ],
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;&gt;=12.0.0 &lt; 16.0.0&quot;,
      &quot;yarn&quot;: &quot;&gt;= 1.0.0&quot;,
      &quot;npm&quot;: &quot;Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/&quot;
    },
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;components&quot;: &quot;yarn workspace @fabric/components&quot;,
      &quot;guide-app&quot;: &quot;yarn workspace @fabric/guide-app&quot;,
      &quot;test&quot;: &quot;yarn guide-app test &amp;&amp; yarn components test&quot;,
      &quot;postinstall&quot;: &quot;ngcc&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;12.0.2&quot;,
      &quot;@angular/cdk&quot;: &quot;12.0.2&quot;,
      &quot;@angular/common&quot;: &quot;12.0.2&quot;,
      &quot;@angular/compiler&quot;: &quot;12.0.2&quot;,
      &quot;@angular/core&quot;: &quot;12.0.2&quot;,
      &quot;@angular/flex-layout&quot;: &quot;12.0.0-beta.34&quot;,
      &quot;@angular/forms&quot;: &quot;12.0.2&quot;,
      &quot;@angular/localize&quot;: &quot;12.0.2&quot;,
      &quot;@angular/material&quot;: &quot;12.0.2&quot;,
      &quot;@angular/platform-browser&quot;: &quot;12.0.2&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;12.0.2&quot;,
      &quot;@angular/router&quot;: &quot;12.0.2&quot;,
      &quot;rxjs&quot;: &quot;6.6.7&quot;,
      &quot;tslib&quot;: &quot;2.2.0&quot;,
      &quot;zone.js&quot;: &quot;0.11.4&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;12.0.2&quot;,
      &quot;@angular-devkit/core&quot;: &quot;12.0.2&quot;,
      &quot;@angular-devkit/schematics&quot;: &quot;12.0.2&quot;,
      &quot;@angular/cli&quot;: &quot;12.0.2&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;12.0.2&quot;,
      &quot;@angular/language-service&quot;: &quot;12.0.2&quot;,
      &quot;@schematics/angular&quot;: &quot;12.0.2&quot;,
      &quot;@types/jest&quot;: &quot;26.0.23&quot;,
      &quot;@types/node&quot;: &quot;14.14.37&quot;,
      &quot;codelyzer&quot;: &quot;6.0.2&quot;,
      &quot;jest&quot;: &quot;26.6.3&quot;,
      &quot;jest-junit&quot;: &quot;12.1.0&quot;,
      &quot;jest-preset-angular&quot;: &quot;8.4.0&quot;,
      &quot;jest-transform-stub&quot;: &quot;2.0.0&quot;,
      &quot;ng-packagr&quot;: &quot;12.0.2&quot;,
      &quot;protractor&quot;: &quot;7.0.0&quot;,
      &quot;tslint&quot;: &quot;6.1.3&quot;,
      &quot;typescript&quot;: &quot;4.2.4&quot;
    }
  }
  
  </code></pre>
  <p>lib package</p>
  <pre><code>{
    &quot;name&quot;: &quot;@fabric/components&quot;,
    &quot;version&quot;: &quot;5.0.2&quot;,
    &quot;license&quot;: &quot;UNLICENSED&quot;,
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;&gt;=12.0.0 &lt; 16.0.0&quot;,
      &quot;yarn&quot;: &quot;&gt;= 1.0.0&quot;,
      &quot;npm&quot;: &quot;Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/&quot;
    },
    &quot;scripts&quot;: {
      &quot;build&quot;: &quot;ng build components --configuration production&quot;,
      &quot;watch&quot;: &quot;ng build components --watch&quot;,
      &quot;test&quot;: &quot;jest --config ./jest.config.js&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@fontsource/roboto&quot;: &quot;^4.4.0&quot;,
      &quot;tslib&quot;: &quot;^2.2.0&quot;
    },
    &quot;peerDependencies&quot;: {
      &quot;@angular/cdk&quot;: &quot;^12.0.0&quot;,
      &quot;@angular/common&quot;: &quot;^12.0.0&quot;,
      &quot;@angular/core&quot;: &quot;^12.0.0&quot;,
      &quot;@angular/flex-layout&quot;: &quot;^12.0.0-beta.34&quot;,
      &quot;@angular/localize&quot;: &quot;^12.0.0&quot;,
      &quot;@angular/material&quot;: &quot;^12.0.0&quot;
    }
  }
  
  </code></pre>
  <p>app package</p>
  <pre><code>{
    &quot;name&quot;: &quot;@fabric/guide-app&quot;,
    &quot;version&quot;: &quot;5.0.1&quot;,
    &quot;license&quot;: &quot;UNLICENSED&quot;,
    &quot;engines&quot;: {
      &quot;node&quot;: &quot;&gt;=12.0.0 &lt; 16.0.0&quot;,
      &quot;yarn&quot;: &quot;&gt;= 1.0.0&quot;,
      &quot;npm&quot;: &quot;Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/&quot;
    },
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;ng build --configuration production&quot;,
      &quot;watch&quot;: &quot;ng build --watch --configuration development&quot;,
      &quot;test&quot;: &quot;jest --config ./jest.config.js&quot;,
      &quot;lint&quot;: &quot;ng lint&quot;,
      &quot;e2e&quot;: &quot;ng e2e&quot;,
    },
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@fabric/components&quot;: &quot;^5.0.0&quot;,
      &quot;@ngx-translate/core&quot;: &quot;~13.0.0&quot;,
      &quot;@ngx-translate/http-loader&quot;: &quot;~6.0.0&quot;,
      &quot;ngx-highlightjs&quot;: &quot;~4.1.3&quot;
    }
  }
  
  </code></pre>
  <p>So I guess, first, is my assumption correct, that Yarn <em>should</em> be building the dependent package?
  And if so, is there something in my config that isn't correct?  If that's not part of yarn's offering, do you have any suggestion to what could be added to support this?</p>