Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

371
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!