title: Failed to build angular 7 component library
body: <p>I once created component lib in angular version 11 smoothly without any problems, but when I created component lib in angular version 7, I got an error when ng build component lib</p>
  <pre><code>Cannot find module 'tsickle/src/tsickle'
  Require stack:
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ngc\create-emit-callback.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ngc\compile-source-files.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\entry-point\ts\compile-ngc.transform.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\entry-point\ts\compile-ngc.di.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\entry-point.di.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\packagr.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\commands\build.command.js
  - D:\Angular7\CSS\node_modules\ng-packagr\public_api.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\build-ng-packagr\src\build\index.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\architect\src\architect-legacy.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\architect\src\index.js
  - D:\Angular7\CSS\node_modules\@angular\cli\models\architect-command.js
  - D:\Angular7\CSS\node_modules\@angular\cli\commands\build-impl.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\schematics\tools\export-ref.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\schematics\tools\index.js
  - D:\Angular7\CSS\node_modules\@angular\cli\utilities\json-schema.js
  - D:\Angular7\CSS\node_modules\@angular\cli\models\command-runner.js
  - D:\Angular7\CSS\node_modules\@angular\cli\lib\cli\index.js
  - C:\Users\SuperAdmin\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
  - C:\Users\SuperAdmin\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
  Error: Cannot find module 'tsickle/src/tsickle'
  Require stack:
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ngc\create-emit-callback.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ngc\compile-source-files.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\entry-point\ts\compile-ngc.transform.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\entry-point\ts\compile-ngc.di.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\entry-point.di.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\ng-v5\packagr.js
  - D:\Angular7\CSS\node_modules\ng-packagr\lib\commands\build.command.js
  - D:\Angular7\CSS\node_modules\ng-packagr\public_api.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\build-ng-packagr\src\build\index.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\architect\src\architect-legacy.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\architect\src\index.js
  - D:\Angular7\CSS\node_modules\@angular\cli\models\architect-command.js
  - D:\Angular7\CSS\node_modules\@angular\cli\commands\build-impl.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\schematics\tools\export-ref.js
  - D:\Angular7\CSS\node_modules\@angular-devkit\schematics\tools\index.js
  - D:\Angular7\CSS\node_modules\@angular\cli\utilities\json-schema.js
  - D:\Angular7\CSS\node_modules\@angular\cli\models\command-runner.js
  - D:\Angular7\CSS\node_modules\@angular\cli\lib\cli\index.js
  - C:\Users\SuperAdmin\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
  - C:\Users\SuperAdmin\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
      at Function.Module._load (internal/modules/cjs/loader.js:725:27)
      at Module.require (internal/modules/cjs/loader.js:952:19)
      at require (internal/modules/cjs/helpers.js:88:18)
      at Object.&lt;anonymous&gt; (D:\Angular7\CSS\node_modules\ng-packagr\lib\ngc\create-emit-callback.js:15:17)
      at Module._compile (internal/modules/cjs/loader.js:1063:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
      at Module.load (internal/modules/cjs/loader.js:928:32)
      at Function.Module._load (internal/modules/cjs/loader.js:769:14)
      at Module.require (internal/modules/cjs/loader.js:952:19)
      at require (internal/modules/cjs/helpers.js:88:18)
      at Object.&lt;anonymous&gt; (D:\Angular7\CSS\node_modules\ng-packagr\lib\ngc\compile-source-files.js:13:32)
      at Module._compile (internal/modules/cjs/loader.js:1063:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
      at Module.load (internal/modules/cjs/loader.js:928:32)
      at Function.Module._load (internal/modules/cjs/loader.js:769:14)
  </code></pre>
  <p>He asked for the tsickle module, but in the json package tsickle already exists</p>
  <p>my <code>package.json</code></p>
  <pre><code>{
      &quot;name&quot;: &quot;CSS&quot;,
      &quot;version&quot;: &quot;0.0.0&quot;,
      &quot;scripts&quot;: {
          &quot;ng&quot;: &quot;ng&quot;,
          &quot;start&quot;: &quot;ng serve&quot;,
          &quot;build&quot;: &quot;ng build&quot;,
          &quot;test&quot;: &quot;ng test&quot;,
          &quot;lint&quot;: &quot;ng lint&quot;,
          &quot;e2e&quot;: &quot;ng e2e&quot;,
          &quot;buildSimple&quot;: &quot;ng build Simple&quot;
      },
      &quot;private&quot;: true,
      &quot;dependencies&quot;: {
          &quot;@angular/animations&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/common&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/compiler&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/core&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/forms&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/platform-browser&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/platform-browser-dynamic&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/router&quot;: &quot;~7.2.0&quot;,
          &quot;core-js&quot;: &quot;^2.5.4&quot;,
          &quot;rxjs&quot;: &quot;~6.3.3&quot;,
          &quot;tslib&quot;: &quot;^1.9.0&quot;,
          &quot;zone.js&quot;: &quot;~0.8.26&quot;
      },
      &quot;devDependencies&quot;: {
          &quot;@angular-devkit/build-angular&quot;: &quot;~0.13.0&quot;,
          &quot;@angular-devkit/build-ng-packagr&quot;: &quot;~0.13.0&quot;,
          &quot;@angular/cli&quot;: &quot;~7.3.10&quot;,
          &quot;@angular/compiler-cli&quot;: &quot;~7.2.0&quot;,
          &quot;@angular/language-service&quot;: &quot;~7.2.0&quot;,
          &quot;@types/node&quot;: &quot;~8.9.4&quot;,
          &quot;@types/jasmine&quot;: &quot;~2.8.8&quot;,
          &quot;@types/jasminewd2&quot;: &quot;~2.0.3&quot;,
          &quot;codelyzer&quot;: &quot;~4.5.0&quot;,
          &quot;jasmine-core&quot;: &quot;~2.99.1&quot;,
          &quot;jasmine-spec-reporter&quot;: &quot;~4.2.1&quot;,
          &quot;karma&quot;: &quot;~4.0.0&quot;,
          &quot;karma-chrome-launcher&quot;: &quot;~2.2.0&quot;,
          &quot;karma-coverage-istanbul-reporter&quot;: &quot;~2.0.1&quot;,
          &quot;karma-jasmine&quot;: &quot;~1.1.2&quot;,
          &quot;karma-jasmine-html-reporter&quot;: &quot;^0.2.2&quot;,
          &quot;ng-packagr&quot;: &quot;^4.2.0&quot;,
          &quot;protractor&quot;: &quot;~5.4.0&quot;,
          &quot;ts-node&quot;: &quot;~7.0.0&quot;,
          &quot;tsickle&quot;: &quot;&gt;=0.35.0&quot;,
          &quot;tslib&quot;: &quot;^1.9.0&quot;,
          &quot;tslint&quot;: &quot;~5.11.0&quot;,
          &quot;typescript&quot;: &quot;~3.2.2&quot;
      }
  }
  </code></pre>
  <p>I've also tried turning it off <code>&quot;annotateForClosureCompiler&quot;: false</code>
  to not be bound/need tsickle but that also doesn't work</p>
  <p>I've also tried Replacing the tsickle directive which is in <code>@node_modules/ng-packagr/lib/ngc/create-emit-callback.js</code></p>
  <p><code>const tsickle = require(&quot;tsickle/src/tsickle&quot;);</code></p>
  <p>to be</p>
  <p><code>const tsickle = require(&quot;tsickle/build/src/tsickle&quot;);</code></p>
  <p>or</p>
  <p><code>const tsickle = require(&quot;../../../tsickle/out/src/tsickle&quot;);</code></p>
  <p>it doesn't work instead it adds to my error message</p>
  <blockquote>
  <p>what actually happened to my version 7 angular app? why can't ng build component library</p>
  </blockquote>
  <p><strong>I'm quite frustrated, all the help and suggestions for help, I thank you</strong></p>