首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >角度升级问题

角度升级问题
EN

Stack Overflow用户
提问于 2021-12-27 11:18:24
回答 1查看 1.5K关注 0票数 -1

我们正在尝试升级角度版本从7.2到12.x。我们对angular.io上可用的文档遵循了步骤。我们也用最新的模块库更新了我们的模块库。现在,当我们启动应用程序时,我们遇到了以下错误:

代码语言:javascript
复制
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:0&sockPath=/sockjs-node - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
RangeError: Maximum call stack size exceeded
    at MetadataDtsModuleScopeResolver.resolve (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:47:69)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:515:51)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:365:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)

[36m./src/main.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
RangeError: Maximum call stack size exceeded
    at MetadataDtsModuleScopeResolver.resolve (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:47:69)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:515:51)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:365:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)

./src/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
RangeError: Maximum call stack size exceeded
    at MetadataDtsModuleScopeResolver.resolve (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\dependency.js:47:69)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:515:51)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:365:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)
    at LocalModuleScopeRegistry.getScopeOfModuleReference (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:257:44)
    at LocalModuleScopeRegistry.getExportedScope (D:\workspace\1.3-uiux\NextGeneUI\nextgeneui-app\node_modules\@angular\compiler-cli\src\ngtsc\scope\src\local.js:519:29)



** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


× Failed to compile.

我们尝试过删除node_modules和Packy-lock.json并重新安装node_modules,但这些都没有帮助。

请帮帮忙。

package.json

代码语言:javascript
复制
{
  "name": "nextgeneui-app",
  "version": "1.3.0",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "~12.2.0",
    "@angular/cdk": "^12.2.13",
    "@angular/common": "~12.2.0",
    "@angular/compiler": "~12.2.0",
    "@angular/core": "~12.2.0",
    "@angular/forms": "~12.2.0",
    "@angular/platform-browser": "~12.2.0",
    "@angular/platform-browser-dynamic": "~12.2.0",
    "@angular/router": "~12.2.0",
    "@ng-idle/core": "^11.1.0",
    "@ng-idle/keepalive": "^11.0.3",
    "@ng-select/ng-select": "^7.4.0",
    "@ngu/carousel": "^4.0.0",
    "@types/backbone": "^1.3.43",
    "@types/dagre": "^0.7.46",
    "@types/jquery": "^3.5.9",
    "@types/lodash": "^4.14.123",
    "@types/underscore": "^1.11.4",
    "angular-dual-listbox": "^6.0.0",
    "angular-gridster2": "^12.1.1",
    "angular-plotly.js": "^1.3.2",
    "angular-resize-event": "^3.0.2",
    "angular2-highlight-js": "^9.0.0",
    "apexcharts": "^3.30.0",
    "bootstrap": "^4.6.1",
    "bootstrap-colorpicker": "^3.0.3",
    "bootstrap-duallistbox": "^3.0.6",
    "bootstrap-markdown": "^2.10.0",
    "bootstrap-progressbar": "^0.9.0",
    "bootstrap-slider": "^10.6.1",
    "bootstrap-tagsinput": "^0.7.1",
    "bootstrap-timepicker": "^0.5.2",
    "chart.js": "^2.7.2",
    "d3": "^5.9.1",
    "d3-graphviz": "^2.6.1",
    "d3-hexbin": "^0.2.2",
    "diff2html": "^3.4.13",
    "dropzone": "^6.0.0-beta.2",
    "easy-pie-chart": "^2.1.7",
    "file-saver": "^2.0.2",
    "highlight.js": "^11.3.1",
    "html2canvas": "^1.3.3",
    "html2pdf.js": "^0.10.1",
    "jointjs": "^3.4.4",
    "jquery": "3.3.1",
    "jquery-knob": "^1.2.11",
    "jquery-ui-npm": "^1.12.0",
    "jquery-validation": "^1.19.0",
    "jquery.maskedinput": "^1.4.1",
    "js-yaml": "^4.1.0",
    "ng-apexcharts": "^1.6.0",
    "ng-circle-progress": "^1.6.0",
    "ng-dynamic-component": "^10.1.0",
    "ng-multiselect-dropdown": "^0.3.7",
    "ng2-eonasdan-datetimepicker": "^0.1.3",
    "ng2-search-filter": "^0.5.1",
    "ngx-bootstrap": "^7.1.0",
    "ngx-color-picker": "^11.0.0",
    "ngx-cookie-service": "^2.2.0",
    "ngx-json-viewer": "^2.4.0",
    "ngx-logger": "^5.0.4",
    "ngx-papaparse": "^5.0.0",
    "papaparse": "^5.3.1",
    "plotly.js": "^2.8.3",
    "primeicons": "^5.0.0",
    "primeng": "^12.2.3",
    "redux": "^4.1.2",
    "resumablejs": "^1.1.0",
    "rxjs": "~6.6.7",
    "Select2": "^3.5.7",
    "smartadmin-plugins": "^1.0.22",
    "tslib": "^2.3.0",
    "tslint": "^6.1.3",
    "util": "^0.12.4",
    "vis": "^4.21.0-EOL",
    "webpack": "^5.65.0",
    "xlsx": "^0.17.4",
    "yarn": "^1.22.17",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^12.2.14",
    "@angular/cli": "^12.2.14",
    "@angular/compiler-cli": "~12.2.0",
    "@ngtools/webpack": "^12.2.14",
    "@types/jasmine": "~3.10.0",
    "@types/node": "^12.11.1",
    "jasmine-core": "~3.10.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.2.4"
  }
}

tsconfig.json

要了解有关此文件的更多信息,请参见: /*:https://angular.io/config/tsconfig。*/

代码语言:javascript
复制
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "forceConsistentCasingInFileNames": true,
    "strict": false,
    "noPropertyAccessFromIndexSignature": true,
    "noImplicitReturns": false,
    "noFallthroughCasesInSwitch": true,
    "emitDecoratorMetadata": true,    
    "allowJs": true,
      "suppressImplicitAnyIndexErrors": true,
      "allowSyntheticDefaultImports": true,
      "skipLibCheck": true,
    "target": "es2015",
    "esModuleInterop": true,
    "module": "es2020",
        "typeRoots": [ 
              "./types", "./node_modules/@types"
        ],
        "lib": [
            "es2018",
            "dom"
        ]
    },
    "angularCompilerOptions": {
    "enableI18nLegacyMessageIdFormat": false,
      "fullTemplateTypeCheck": true,
    "strictInjectionParameters": true,
    "strictInputAccessModifiers": true,
    "strictTemplates": true,
      "strictPropertyInitialization": false,
    "enableIvy": false
  }
}
EN

回答 1

Stack Overflow用户

发布于 2021-12-28 05:45:36

通过安装Node的当前稳定版本(12/2021的版本16 ),也解决了更新角的类似问题。https://github.com/mattlewis92/angular-calendar/issues/1289

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70494769

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档