1

我目前在 gitlab 运行器上构建我的应用程序时遇到问题,问题并不总是出现,这是错误的屏幕截图 在此处输入图像描述

我一直在尝试解决方案,例如调整节点内存并将测试器版本指定 为 package.json 中的"terser":"3.14.1",但没有希望。

package.json :

{
  "name": "my-app",
  "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-devkit/build-optimizer": "^0.901.7",
    "@angular/animations": "^9.1.9",
    "@angular/cdk": "^9.2.4",
    "@angular/common": "^9.1.9",
    "@angular/compiler": "^9.1.9",
    "@angular/core": "^9.1.9",
    "@angular/forms": "^9.1.9",
    "@angular/localize": "^9.1.9",
    "@angular/material": "^9.2.4",
    "@angular/platform-browser": "^9.1.9",
    "@angular/platform-browser-dynamic": "^9.1.9",
    "@angular/router": "^9.1.9",
    "@ng-bootstrap/ng-bootstrap": "^6.1.0",
    "@ng-select/ng-select": "^4.0.0",
    "@ngx-translate/core": "^12.1.2",
    "@ngx-translate/http-loader": "^4.0.0",
    "@nicky-lenaers/ngx-scroll-to": "^9.0.0",
    "@types/prismjs": "^1.16.1",
    "@types/react": "^16.9.34",
    "@types/react-dom": "^16.9.6",
    "ang-jsoneditor": "1.9.4",
    "angular-2-local-storage": "^3.0.2",
    "angular-confirmation-popover": "^5.0.0",
    "angular-markdown-editor": "^2.0.2",
    "angular5-csv": "^0.2.11",
    "classlist.js": "^1.1.20150312",
    "core-js": "^3.6.5",
    "cytoscape": "^3.15.0",
    "cytoscape-cola": "^2.3.1",
    "graphql-playground-react": "^1.7.23",
    "gygraph-ui": "file:src/app/projects/gygraph-ui",
    "install": "^0.13.0",
    "jquery": "^3.5.1",
    "jsoneditor": "^8.6.8",
    "jwt-decode": "^2.2.0",
    "marked": "^1.1.0",
    "ng2-dragula": "^1.5.0",
    "ngx-bootstrap": "5.6.1",
    "ngx-cookie-service": "^3.0.4",
    "ngx-export-as": "1.4.2",
    "ngx-pagination": "^5.0.0",
    "ngx-toastr": "^12.0.1",
    "node-sass": "^4.14.1",
    "npm": "^6.14.5",
    "path": "^0.12.7",
    "primeng": "^9.1.0",
    "prismjs": "^1.15.0",
    "quill": "^1.3.6",
    "rxjs": "~6.5.5",
    "swagger-ui-dist": "^3.25.4",
    "sweetalert2": "^9.13.1",
    "terser": "3.14.1",
    "tslib": "^1.10.0",
    "typescript": "~3.8.3",
    "util": "^0.12.3",
    "web-animations-js": "^2.3.2",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.901.7",
    "@angular/cli": "^9.1.9",
    "@angular/compiler-cli": "^9.1.9",
    "@angular/language-service": "^9.1.9",
    "@types/jasmine": "~3.5.10",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~14.0.5",
    "codelyzer": "~5.2.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.2",
    "karma": "~5.0.9",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~3.1.1",
    "karma-jasmine-html-reporter": "^1.5.4",
    "protractor": "~7.0.0",
    "ts-node": "~8.10.1",
    "tslint": "~6.1.2"
  },
  "peerDependencies": {
    "typescript": "~3.8.3",
    "tslib": "1.10.0"
  }
}

该构建在 angular v8 中运行良好,但升级后我遇到了这个问题。谢谢。

4

1 回答 1

0

既然你说更新后就坏了,我建议查一下配置的node版本和@angular/cli版本.gitlab-ci.yml。他们可能只需要分别提升他们的版本以匹配较新的 Angular 版本。

于 2020-09-14T19:19:47.343 回答