title: Angular 8 - Error - Cannot find module '@angular/forms/src/directives/validators
body: <p>I installed a new package:<br>
  <code>npm install --save ngx-cpf-cnpj</code>  </p>
  
  <p>And now I receive an error message.</p>
  
  <p>My package.json</p>
  
  <pre><code>"dependencies": {
  "@angular/animations": "~8.0.0",
  "@angular/cdk": "^8.0.0",
  "@angular/common": "~8.0.0",
  "@angular/compiler": "~8.0.0",
  "@angular/core": "~8.0.0",
  "@angular/flex-layout": "^8.0.0-beta.26",
  "@angular/forms": "~8.0.0",
  "@angular/material": "^8.0.0",
  "@angular/platform-browser": "~8.0.0",
  "@angular/platform-browser-dynamic": "~8.0.0",
  "@angular/router": "~8.0.0",
  "hammerjs": "^2.0.8",
  "ngx-cpf-cnpj": "^1.0.3",
  "ngx-mask": "^7.9.9",
  "rxjs": "~6.4.0",
  "rxjs-compat": "^6.5.2",
  "tslib": "^1.9.0",
  "zone.js": "~0.9.1"
  },
  </code></pre>
  
  <p>The error message:</p>
  
  <pre><code>ERROR in node_modules/ngx-cpf-cnpj/lib/cpf-cnpj-validator.directive.d.ts(6,38): error TS2307: Cannot find module '@angular/forms/src/directives/validators'.
  </code></pre>
  
  <p>How can I solve this issue?</p>
  
  <p>I don't have a folder <code>node_modules/@angular/forms/src</code> </p>
  
  <p><a href="https://i.stack.imgur.com/0W6p7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/0W6p7.png" alt="enter image description here"></a></p>
  
  <p>This is my app.module.ts, I'm using FormsModule:</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { FormsModule } from '@angular/forms';
  import { ReactiveFormsModule } from '@angular/forms';    
  import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
  import {MaterialModule} from './material.module';
  import {FlexLayoutModule} from '@angular/flex-layout';
  ...
  import {NgxMaskModule} from 'ngx-mask';
  import { NgxCpfCnpjModule } from  'ngx-cpf-cnpj';
  ...
    imports: [
      BrowserModule,
      NgxMaskModule.forRoot(),
      NgxCpfCnpjModule,
      ReactiveFormsModule,
      AppRoutingModule,
      BrowserAnimationsModule,
      FlexLayoutModule,
      FormsModule,
      MaterialModule
    ],
  </code></pre>
  
  <p>Inside cpf-cnpj-validator.directive.d.ts there is this line:   </p>
  
  <pre><code>import("@angular/forms/src/directives/validators").ValidationErrors;
  </code></pre>