title: Next.js project build error: Entry point for implicit type library 'build'
body: <p>I am trying to build nextjs project and getting this error:</p>
  <pre><code>Type error: Cannot find type definition file for 'build'.
    The file is in the program because:
      Entry point for implicit type library 'build'
  </code></pre>
  <p>how can I build without this error?</p>
  <p>This is how package.json looks:</p>
  <pre><code>{
    &quot;name&quot;: &quot;frontend&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;license&quot;: &quot;fa&quot;,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;next dev&quot;,
      &quot;build&quot;: &quot;next build&quot;,
      &quot;start&quot;: &quot;next start&quot;,
      &quot;lint&quot;: &quot;next lint&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@ckeditor/ckeditor5-alignment&quot;: &quot;^33.0.0&quot;,
      &quot;@ckeditor/ckeditor5-build-classic&quot;: &quot;^33.0.0&quot;,
      &quot;@ckeditor/ckeditor5-code-block&quot;: &quot;^33.0.0&quot;,
      &quot;@ckeditor/ckeditor5-react&quot;: &quot;^4.0.0&quot;,
      &quot;@hookform/resolvers&quot;: &quot;^2.8.8&quot;,
      &quot;@types/&quot;: &quot;ckeditor/ckeditor5-alignment&quot;,
      &quot;axios&quot;: &quot;^0.26.0&quot;,
      &quot;dompurify&quot;: &quot;^2.3.6&quot;,
      &quot;highlight.js&quot;: &quot;^11.5.0&quot;,
      &quot;isomorphic-dompurify&quot;: &quot;^0.18.0&quot;,
      &quot;mobx&quot;: &quot;^6.4.2&quot;,
      &quot;mobx-react-lite&quot;: &quot;^3.3.0&quot;,
      &quot;next&quot;: &quot;^12.1.5&quot;,
      &quot;nextjs-progressbar&quot;: &quot;^0.0.14&quot;,
      &quot;react&quot;: &quot;^18.0.0&quot;,
      &quot;react-dom&quot;: &quot;^18.0.0&quot;,
      &quot;react-hook-form&quot;: &quot;^7.27.1&quot;,
      &quot;sass&quot;: &quot;^1.49.9&quot;,
      &quot;yup&quot;: &quot;^0.32.11&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@types/node&quot;: &quot;^17.0.25&quot;,
      &quot;@types/react&quot;: &quot;^18.0.6&quot;,
      &quot;eslint&quot;: &quot;8.10.0&quot;,
      &quot;eslint-config-next&quot;: &quot;12.1.0&quot;,
      &quot;typescript&quot;: &quot;^4.6.3&quot;
    }
  }
  </code></pre>
  <p>I am trying to build using yarn build command</p>
  <p>Why am I getting this error and how can I get rid of it?</p>