angular new version build fail not like similar questions

Viewed 75

This is the error I'm getting. I checked similar questions of build fail but none of them are working for me so asking it. Everything that could be needed is attached in the question. enableIvy is false Already tried unistalling node modules and installing, ng updatesand all mentioned. like doing -->this in tsconfig.json, in angularCompilerOptions have set ("enableIvy": false) doesnt help me Remove node_modules folder and reinstall packages ng update @angular/cli @angular/core

    For additional information or if the build fails, please see https://angular.io/guide/ivy
⠙ Generating browser application bundles (phase: setup)...Warning: Entry point 'ng5-slider' contains deep imports into 'E:/jlr-web/node_modules/ng5-slider/node_modules/rxjs/operators'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
Processing legacy "View Engine" libraries:
- ng-multiselect-dropdown [es2015/esm2015] (https://github.com/nileshpatel17/ng-multiselect-dropdown.git)
- ng2-go-top-button [main/esm5] (https://github.com/annapogorelova/ng2-go-top-button.git)
- angular-fusioncharts [main/esm5] (https://github.com/fusioncharts/angular-fusioncharts)
- ng5-slider [es2015/esm2015] (https://github.com/angular-slider/ng5-slider.git)
Error: Error on worker #2: Error: Compiled class declaration is not inside an IIFE: GoTopButton in E:/jlr-web/node_modules/ng2-go-top-button/dist/src/go-top-button.component.js
    at Esm5RenderingFormatter.addDefinitions (file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-W4NQEJ6V.js:4152:13)
    at file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-W4NQEJ6V.js:4398:27
    at Array.forEach (<anonymous>)
    at Renderer.renderFile (file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-W4NQEJ6V.js:4395:36)
    at file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-W4NQEJ6V.js:4383:36
    at Array.forEach (<anonymous>)
    at Renderer.renderProgram (file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-W4NQEJ6V.js:4380:46)
    at Transformer.transform (file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-W4NQEJ6V.js:4606:32)
    at file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-W4NQEJ6V.js:4686:34
    at Worker.<anonymous> (file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js:71:24)
    at ClusterMaster.onWorkerMessage (file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-MPQCXKXX.js:1473:15)
    at file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-MPQCXKXX.js:1383:71
    at EventEmitter.<anonymous> (file:///E:/jlr-web/node_modules/@angular/compiler-cli/bundles/chunk-MPQCXKXX.js:1541:15)
    at EventEmitter.emit (node:events:390:28)
    at Worker.<anonymous> (node:internal/cluster/primary:186:13)
    at Worker.emit (node:events:390:28)
    at ChildProcess.<anonymous> (node:internal/cluster/worker:33:12)
    at ChildProcess.emit (node:events:390:28)
    at emit (node:internal/child_process:917:12)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)
✔ Browser application bundle generation complete.

Initial Chunk Files   | Names         |  Raw Size | Estimated Transfer Size
styles.css, styles.js | styles        |   5.41 MB |               325.79 kB
main.js               | main          | 117.82 kB |                28.90 kB
polyfills.js          | polyfills     | 117.82 kB |                28.94 kB
runtime.js            | runtime       |   1.24 kB |               673 bytes

                      | Initial Total |   5.64 MB |               384.28 kB

Build at: 2022-09-20T09:47:29.058Z - Hash: 971dcc847bebd357 - Time: 38029ms

Warning: 18 rules skipped due to selector errors:
  .e-bigger .e-card > .e-card-header-title + :not(.e-card-header-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger.e-card > .e-card-header-title + :not(.e-card-header-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger .e-card > .e-card-title + :not(.e-card-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger.e-card > .e-card-title + :not(.e-card-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger .e-card .e-card-content + :not(.e-card-content) -> Cannot read properties of undefined (reading 'type')
  .e-bigger.e-card .e-card-content + :not(.e-card-content) -> Cannot read properties of undefined (reading 'type')
  .e-card > .e-card-header-title + :not(.e-card-header-title) -> Cannot read properties of undefined (reading 'type')
  .e-card > .e-card-title + :not(.e-card-title) -> Cannot read properties of undefined (reading 'type')
  .e-card .e-card-content + :not(.e-card-content) -> Cannot read properties of undefined (reading 'type')
  .e-bigger .e-card > .e-card-header-title + :not(.e-card-header-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger.e-card > .e-card-header-title + :not(.e-card-header-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger .e-card > .e-card-title + :not(.e-card-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger.e-card > .e-card-title + :not(.e-card-title) -> Cannot read properties of undefined (reading 'type')
  .e-bigger.e-card .e-card-content + :not(.e-card-content) -> Cannot read properties of undefined (reading 'type')
  .e-card > .e-card-header-title + :not(.e-card-header-title) -> Cannot read properties of undefined (reading 'type')
  .e-card > .e-card-title + :not(.e-card-title) -> Cannot read properties of undefined (reading 'type')
  .e-card .e-card-content + :not(.e-card-content) -> Cannot read properties of undefined (reading 'type')



./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Emit attempted before Angular Webpack plugin initialization.

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Emit attempted before Angular Webpack plugin initialization.

Error: Failed to initialize Angular compilation - NGCC failed.

this is my versions

Node: 16.10.0
Package Manager: npm 7.24.0
OS: win32 x64

Angular: 14.2.2
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1402.3
@angular-devkit/build-angular   14.2.3
@angular-devkit/core            14.2.3
@angular-devkit/schematics      14.2.3
@angular/cli                    14.2.3
@schematics/angular             14.2.3
rxjs                            7.5.6
typescript                      4.8.3

this is npm ls @ngtools/webpack

PS E:\jlr-web> npm ls @ngtools/webpack
jlr@0.0.0 E:\jlr-web
└─┬ @angular-devkit/build-angular@14.2.3
  └── @ngtools/webpack@14.2.3

package.json

{
  "name": "j",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~14.2.2",
    "@angular/cdk": "^14.2.2",
    "@angular/common": "~14.2.2",
    "@angular/compiler": "~14.2.2",
    "@angular/core": "~14.2.2",
    "@angular/forms": "^14.2.2",
    "@angular/material": "^14.2.2",
    "@angular/material-moment-adapter": "^14.2.2",
    "@angular/platform-browser": "~14.2.2",
    "@angular/platform-browser-dynamic": "~14.2.2",
    "@angular/router": "~14.2.2",
    "@syncfusion/ej2-angular-buttons": "^20.2.46",
    "@syncfusion/ej2-angular-calendars": "^20.2.46",
    "@syncfusion/ej2-angular-filemanager": "^20.2.45",
    "@syncfusion/ej2-angular-grids": "^20.2.49",
    "@syncfusion/ej2-material-theme": "^20.2.49",
    "angular-animations": "^0.11.0",
    "angular-datatables": "^14.0.0",
    "angular-fusioncharts": "^4.0.0",
    "angular-ng-autocomplete": "^2.0.12",
    "angular2-datatable": "^0.6.0",
    "bootstrap": "^5.2.1",
    "crypto-js": "^4.1.1",
    "crypto-ts": "^1.0.2",
    "currency-symbol-map": "^5.1.0",
    "d3": "^7.6.1",
    "file-saver": "^2.0.5",
    "fusioncharts": "^3.19.0",
    "html2canvas": "^1.4.1",
    "jquery": "^3.6.1",
    "jspdf": "^2.5.1",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "ng-animate": "^2.0.1",
    "ng-multiselect-dropdown": "^0.3.8",
    "ng2-date-picker": "^14.0.1",
    "ng2-go-top-button": "^8.0.6",
    "ng5-slider": "^1.2.6",
    "ngx-bootstrap": "^9.0.0",
    "ngx-permissions": "^14.0.0",
    "ngx-toastr": "^15.0.0",
    "ngx-ui-loader": "^13.0.0",
    "ngx-ui-switch": "^14.0.3",
    "popper.js": "^1.16.1",
    "rxjs": "^7.5.6",
    "tslib": "^2.4.0",
    "uuid": "^9.0.0",
    "xlsx": "^0.18.5",
    "zone.js": "~0.11.8"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^14.2.3",
    "@angular/cli": "^14.2.3",
    "@angular/compiler-cli": "~14.2.2",
    "@angular/language-service": "~14.2.2",
    "@types/datatables.net": "^1.10.23",
    "@types/jasmine": "~4.3.0",
    "@types/jasminewd2": "~2.0.10",
    "@types/jquery": "^3.5.14",
    "@types/lodash": "^4.14.185",
    "@types/node": "^18.7.18",
    "codelyzer": "^6.0.2",
    "jasmine-core": "~4.4.0",
    "jasmine-spec-reporter": "~7.0.0",
    "karma": "~6.4.0",
    "karma-chrome-launcher": "~3.1.1",
    "karma-coverage-istanbul-reporter": "~3.0.3",
    "karma-jasmine": "~5.1.0",
    "karma-jasmine-html-reporter": "^2.0.0",
    "protractor": "~7.0.0",
    "ts-node": "~10.9.1",
    "tslint": "~6.1.0",
    "typescript": "^4.8.3"
  }
}

0 Answers
Related