Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

380
Visualizações
Getting errors in Angular because ɵɵFactoryTarget is undefined

I recently tried upgrading Angular 10 to Angular 12. However, when I run the project in the browser, I get this error in the console:

vendor.js:55447 Uncaught TypeError: Cannot read property 'Directive' of undefined
    at vendor.js:55447
    at vendor.js:54968
    at Object.6 (vendor.js:54971)
    at __webpack_require__ (polyfills.js:55)
    at Object.764 (vendor.js:69649)
    at __webpack_require__ (polyfills.js:55)
    at Object.763 (vendor.js:69620)
    at __webpack_require__ (polyfills.js:55)
    at webpackJsonpCallback (polyfills.js:26)
    at vendor.js:1

And it happens at this line:

DirectiveSuperclass.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: DirectiveSuperclass, deps: [{ token: i0__namespace.Injector }], target: i0__namespace.ɵɵFactoryTarget.Directive });

particularly, this spot: i0__namespace.ɵɵFactoryTarget.Directive

Any ideas what I could be missing here?

Here's my angular.json

{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "newProjectRoot": "projects",
  "schematics": {
    "@schematics/angular:component": {
      "changeDetection": "OnPush",
      "style": "scss"
    }
  },
  "projects": {
    "workspace": {
      "projectType": "library",
      "root": "projects/workspace",
      "sourceRoot": "projects/workspace/src",
      "prefix": "h3",
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:ng-packagr",
          "options": {
            "project": "projects/workspace/ng-package.json"
          },
          "configurations": {
            "production": {
              "tsConfig": "projects/workspace/tsconfig.lib.prod.json"
            },
            "development": {
              "tsConfig": "projects/workspace/tsconfig.lib.json"
            },
            "defaultConfiguration": "production"
          }
        },
      }
    }
  },
  "defaultProject": "workspace",
  "cli": {
    "analytics": false,
     "packageManager": "yarn"
  }
}
over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda