Recientemente intenté actualizar Angular 10 a Angular 12. Sin embargo, cuando ejecuto el proyecto en el navegador, aparece este error en la consola:
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:1Y sucede en esta línea:
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 });
particularmente, este lugar: i0__namespace.ɵɵFactoryTarget.Directive
¿Alguna idea de lo que me podría estar perdiendo aquí?
Aquí está mi 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" } }