簡體   English   中英

./src/main.ts - 錯誤:模塊構建失敗(來自./node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ivy/index.js):

[英]./src/main.ts - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ivy/index.js):

我正在使用 Angular 13.3.9。 我的錯誤在

./src/main.ts - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Cannot resolve type entity i23.InputsModule to symbol
    at C:\Users\99906081\Downloads\EIPHRMUI\node_modules\@angular-devkit\build-angular\node_modules\@ngtools\webpack\src\ivy\loader.js:81:18
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack/src/ivy/index.js):
Error: Cannot resolve type entity i23.InputsModule to symbol
    at C:\Users\99906081\Downloads\EIPHRMUI\node_modules\@angular-devkit\build-angular\node_modules\@ngtools\webpack\src\ivy\loader.js:81:18
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

在此處輸入圖像描述

在此處輸入圖像描述

package.json

{
  "name": "eiphrmui",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
  },
  "private": true,
  "dependencies": {
    "@angular-builders/custom-webpack": "^14.0.1",
    "@angular-devkit/build-webpack": "^0.1402.0",
    "@angular/animations": "~13.3.11",
    "@angular/cdk": "^13.3.9",
    "@angular/common": "~13.3.11",
    "@angular/compiler": "~13.3.11",
    "@angular/core": "^13.3.11",
    "@angular/forms": "~13.3.11",
    "@angular/localize": "^13.3.11",
    "@angular/material": "^13.3.8",
    "@angular/material-moment-adapter": "^13.3.8",
    "@angular/platform-browser": "~13.3.11",
    "@angular/platform-browser-dynamic": "~13.3.11",
    "@angular/router": "~13.3.11",
    "@aspnet/signalr": "^1.0.27",
    "@fortawesome/angular-fontawesome": "^0.10.2",
    "@fortawesome/fontawesome-svg-core": "^6.1.1",
    "@fortawesome/free-solid-svg-icons": "^6.1.1",
    "@microsoft/applicationinsights-web": "^2.8.6",
    "@ng-idle/core": "^11.1.0",
    "@ng-idle/keepalive": "^11.0.3",
    "@ngtools/webpack": "^12.0.5",
    "@progress/kendo-angular-buttons": "^8.0.0",
    "@progress/kendo-angular-common": "^3.0.0",
    "@progress/kendo-angular-dateinputs": "^7.1.0",
    "@progress/kendo-angular-dialog": "^7.1.2",
    "@progress/kendo-angular-dropdowns": "^7.0.3",
    "@progress/kendo-angular-editor": "^4.1.3",
    "@progress/kendo-angular-excel-export": "^5.0.1",
    "@progress/kendo-angular-grid": "^7.2.2",
    "@progress/kendo-angular-intl": "^4.0.0",
    "@progress/kendo-angular-l10n": "^4.0.0",
    "@progress/kendo-angular-label": "^4.0.1",
    "@progress/kendo-angular-menu": "^4.0.0",
    "@progress/kendo-angular-pdf-export": "^4.0.0",
    "@progress/kendo-angular-popup": "^5.0.0",
    "@progress/kendo-angular-toolbar": "^6.0.3",
    "@progress/kendo-angular-tooltip": "^4.0.1",
    "@progress/kendo-angular-treeview": "^7.1.0",
    "@progress/kendo-angular-upload": "^5.3.0",
    "@progress/kendo-data-query": "^1.6.0",
    "@progress/kendo-drawing": "^1.5.12",
    "@progress/kendo-licensing": "^1.0.2",
    "@progress/kendo-theme-default": "^5.5.0",
    "adal-angular": "^1.0.18",
    "adal-angular4": "^9.0.0-beta.0",
    "angular-dropdown": "^0.5.5",
    "bootstrap": "^5.2.0",
    "commonmodules": "file:cc-packs/commonmodules-13.0.0.tgz",
    "crypto-js": "^3.1.9-1",
    "eip-bubbletooltip": "file:cc-packs/eip-bubbletooltip-13.0.0.tgz",
    "eip-calculator": "file:cc-packs/eip-calculator-13.0.0.tgz",
    "eip-help-document": "file:cc-packs/eip-help-document-13.0.0.tgz",
    "eip-notes": "file:cc-packs/eip-notes-13.0.0.tgz",
    "eip-tooltip": "file:cc-packs/eip-tooltip-13.0.0.tgz",
    "eipalert-with-trace": "file:cc-packs/eipalert-with-trace-13.0.0.tgz",
    "eipauto-complete": "file:cc-packs/eipauto-complete-13.0.0.tgz",
    "eipcart": "file:cc-packs/eipcart-13.0.0.tgz",
    "eipcommon-services": "file:cc-packs/eipcommon-services-13.0.0.tgz",
    "eipconfirmation-list-message-box": "file:cc-packs/eipconfirmation-list-message-box-13.0.0.tgz",
    "eipdate-picker": "file:cc-packs/eipdate-picker-13.0.0.tgz",
    "eipdate-range-picker": "file:cc-packs/eipdate-range-picker-13.0.0.tgz",
    "eipdiscussion-forum": "file:cc-packs/eipdiscussion-forum-13.0.0.tgz",
    "eipdivpftrace": "file:cc-packs/eipdivpftrace-13.0.0.tgz",
    "eipdocument-view": "file:cc-packs/eipdocument-view-13.0.0.tgz",
    "eipdocumentupload": "file:cc-packs/eipdocumentupload-13.0.0.tgz",
    "eipexcel-upload": "file:cc-packs/eipexcel-upload-13.0.0.tgz",
    "eipfooter": "file:cc-packs/eipfooter-13.0.0.tgz",
    "eipgeneral-cart": "file:cc-packs/eipgeneral-cart-13.0.0.tgz",
    "eipgrid-settings": "file:cc-packs/eipgrid-settings-13.0.0.tgz",
    "eipheader": "file:cc-packs/eipheader-13.0.0.tgz",
    "eipmessage-box": "file:cc-packs/eipmessage-box-13.0.0.tgz",
    "eipmulti-select-auto-complete": "file:cc-packs/eipmulti-select-auto-complete-13.0.0.tgz",
    "eipnumeric": "file:cc-packs/eipnumeric-13.0.0.tgz",
    "eippdf-view": "file:cc-packs/eippdf-view-13.0.0.tgz",
    "eipsend": "file:cc-packs/eipsend-13.0.0.tgz",
    "eiptab-message-box": "file:cc-packs/eiptab-message-box-13.0.0.tgz",
    "eiptext-box": "file:cc-packs/eiptext-box-13.0.0.tgz",
    "eiptoast-alert": "file:cc-packs/eiptoast-alert-13.0.0.tgz",
    "eipwfsend-back": "file:cc-packs/eipwfsend-back-13.0.0.tgz",
    "eipwftrace": "file:cc-packs/eipwftrace-13.0.0.tgz",
    "file-saver": "^2.0.5",
    "html2canvas": "^1.0.0-rc.7",
    "iv-viewer": "^2.0.1",
    "jquery": "^3.6.0",
    "ng-image-slider": "^1.3.7",
    "ng-wormhole": "^3.0.2",
    "ng2-image-viewer": "^3.0.5",
    "ng2-pdf-viewer": "^9.1.0",
    "rxjs": "^6.6.7",
    "rxjs-compat": "^6.6.7",
    "rxjs-observable": "0.0.7",
    "stream-browserify": "^3.0.0",
    "tslib": "^2.3.0",
    "xlsx": "^0.18.5",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~13.3.9",
    "@angular/cli": "~13.3.9",
    "@angular/compiler-cli": "~13.3.11",
    "@babel/core": "^7.18.13",
    "@babel/plugin-transform-runtime": "^7.18.10",
    "@babel/preset-env": "^7.18.10",
    "@types/jasmine": "~3.8.0",
    "@types/node": "^12.11.1",
    "babel-loader": "^8.2.5",
    "jasmine-core": "~3.8.0",
    "karma": "~6.3.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "~4.0.0",
    "karma-jasmine-html-reporter": "~1.7.0",
    "typescript": "^4.6.4",
    "webpack": "^5.74.0"
  }
}

angular.json

 { "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "EIPHRMUI": { "projectType": "application", "schematics": { }, "root": "", "sourceRoot": "src", "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/EIPHRMUI", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.app.json", "assets": [ "src/favicon.ico", "src/assets", "src/web.config" ], "styles": [ "node_modules/@progress/kendo-theme-default/dist/all.css", "node_modules/bootstrap/dist/css/bootstrap.css", "node_modules/ng2-image-viewer/imageviewer.scss", "src/styles.css" ], "allowedCommonJsDependencies": [ "angular-slickgrid", "stream" ], "scripts": [] }, "configurations": { "production": { "budgets": [ { "type": "initial", "maximumWarning": "500kb", "maximumError": "1mb" }, { "type": "anyComponentStyle", "maximumWarning": "2kb", "maximumError": "4kb" } ], "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } ], "outputHashing": "all" }, "development": { "buildOptimizer": false, "optimization": false, "vendorChunk": true, "extractLicenses": false, "sourceMap": true, "namedChunks": true } }, "defaultConfiguration": "production" }, "serve": { "builder": "@angular-devkit/build-angular:dev-server", "configurations": { "production": { "browserTarget": "EIPHRMUI:build:production" }, "development": { "browserTarget": "EIPHRMUI:build:development" } }, "defaultConfiguration": "development" }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { "browserTarget": "EIPHRMUI:build" } }, "test": { "builder": "@angular-devkit/build-angular:karma", "options": { "main": "src/test.ts", "polyfills": "src/polyfills.ts", "tsConfig": "tsconfig.spec.json", "karmaConfig": "karma.conf.js", "assets": [ "src/favicon.ico", "src/assets" ], "styles": [ "node_modules/@progress/kendo-theme-default/dist/all.css", "node_modules/bootstrap/dist/css/bootstrap.css", "src/styles.css" ], "scripts": [ "node_modules/jquery/dist/jquery.min.js", "node_modules/bootstrap/dist/js/bootstrap.min.js" ] } }, "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ "src/tsconfig.app.json", "src/tsconfig.spec.json" ], "exclude": [ "**/node_modules/**" ] } } } } }, "defaultProject": "EIPHRMUI", "cli": { "analytics": "80f88efa-5d5c-43bc-a939-ea338d7d3ed4", "defaultCollection": "@ngrx/schematics", "cache": { "enabled": false } } }

我得到了同樣的錯誤。 我通過使用以下命令安裝 Angular 編譯器 Webpack 插件來解決:

npm i @ngtools/webpack

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM