【问题标题】:I am getting this error in angular when running ng build. can anyone help me with this?运行 ng build 时,我收到了这个角度错误。谁能帮我这个?
【发布时间】:2021-09-08 08:29:35
【问题描述】:

./node_modules/css-animator/builder/animation_builder.js 167:39-52 中的错误 “在 'tslib' 中找不到导出 '__spreadArray' ./node_modules/css-animator/builder/animation_builder.js 383:47-60 中的错误 “在 'tslib' 中找不到导出 '__spreadArray' ./node_modules/css-animator/builder/animation_builder.js 388:50-63 中的错误 “在 'tslib' 中找不到导出 '__spreadArray' ./node_modules/css-animator/angular/animator.module.js 8:145-163 中的错误 “在“@angular/core”中找不到导出“ɵɵFactoryTarget”(导入为“i0”) ./node_modules/css-animator/angular/animates.directive.js 139:201-219 中的错误 “在“@angular/core”中找不到导出“ɵɵFactoryTarget”(导入为“i0”) ./node_modules/css-animator/angular/animation.service.js 10:149-167 中的错误 “在“@angular/core”中找不到导出“ɵɵFactoryTarget”(导入为“i0”) ./node_modules/css-animator/angular/animator.module.js 16:0-27 中的错误 “在'@angular/core'中找不到导出'ɵɵngDeclareClassMetadata'(导入为'i0') ./node_modules/css-animator/angular/animates.directive.js 144:0-27 中的错误 “在'@angular/core'中找不到导出'ɵɵngDeclareClassMetadata'(导入为'i0') ./node_modules/css-animator/angular/animation.service.js 15:0-27 中的错误 “在'@angular/core'中找不到导出'ɵɵngDeclareClassMetadata'(导入为'i0') ./node_modules/css-animator/angular/animates.directive.js 140:29-52 中的错误 “在'@angular/core'中找不到导出'ɵɵngDeclareDirective'(导入为'i0') ./node_modules/css-animator/angular/animator.module.js 中的错误 8:26-47 “在“@angular/core”中找不到导出“ɵɵngDeclareFactory”(导入为“i0”) ./node_modules/css-animator/angular/animates.directive.js 139:29-50 中的错误 “在“@angular/core”中找不到导出“ɵɵngDeclareFactory”(导入为“i0”) ./node_modules/css-animator/angular/animation.service.js 中的错误 10:28-49 “在“@angular/core”中找不到导出“ɵɵngDeclareFactory”(导入为“i0”) ./node_modules/css-animator/angular/animation.service.js 中的错误 11:29-53 “在“@angular/core”中找不到导出“ɵɵngDeclareInjectable”(导入为“i0”) ./node_modules/css-animator/angular/animator.module.js 中的错误 10:26-48 “在“@angular/core”中找不到导出“ɵɵngDeclareInjector”(导入为“i0”) ./node_modules/css-animator/angular/animator.module.js 中的错误 9:26-48 “在'@angular/core'中找不到导出'ɵɵngDeclareNgModule'(导入为'i0')

包.json

{
  "name": "configurable-dashboard",
  "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": {
    "@agm/core": "^1.0.0-beta.2",
    "@angular/animations": "^8.2.14",
    "@angular/cdk": "^8.2.3",
    "@angular/common": "~8.2.14",
    "@angular/compiler": "~8.2.14",
    "@angular/core": "~8.2.14",
    "@angular/forms": "~8.2.14",
    "@angular/material": "^8.2.3",
    "@angular/platform-browser": "~8.2.14",
    "@angular/platform-browser-dynamic": "~8.2.14",
    "@angular/router": "~8.2.14",
    "@ng-bootstrap/ng-bootstrap": "^4.0.1",
    "@ng-select/ng-select": "^3.7.3",
    "@swimlane/ngx-datatable": "^12.0.0",
    "angular-calendar": "^0.24.0",
    "angular-draggable-droppable": "^2.0.0",
    "angular-gridster2": "^11.0.0",
    "angular-mentions": "^1.3.0",
    "angular-tree-component": "^7.1.0",
    "angular2-chartjs": "^0.5.0",
    "angular2-datatable": "^0.6.0",
    "angular2-lightbox": "^1.4.0",
    "angular2-multiselect-dropdown": "^4.6.3",
    "angular2-text-mask": "^9.0.0",
    "angular2-uuid": "^1.1.1",
    "bootstrap": "^4.0.0",
    "c3": "^0.7.4",
    "classlist.js": "^1.1.20150312",
    "core-js": "^2.5.4",
    "css-animator": "^2.3.0",
    "d3": "^5.15.0",
    "famfamfam-flags": "^1.0.0",
    "font-awesome-scss": "^1.0.0",
    "hammerjs": "^2.0.8",
    "html2canvas": "1.0.0-rc.1",
    "jquery": "^3.5.1",
    "jsonpath": "^1.1.0",
    "jsonpath-plus": "^5.0.3",
    "jspdf": "^2.3.0",
    "moment": "^2.24.0",
    "mydatepicker": "^2.6.6",
    "ng-click-outside": "^3.3.0",
    "ng-multiselect-dropdown": "^0.2.14",
    "ng-select": "^1.0.0-rc.5",
    "ng2-archwizard": "^2.1.0",
    "ng2-currency-mask": "^5.3.1",
    "ng2-date-picker": "^8.0.0",
    "ng2-dragula": "^1.5.0",
    "ng2-file-upload": "^1.3.0",
    "ng2-google-charts": "^3.4.0",
    "ng2-nouislider": "^1.7.9",
    "ng2-toasty": "^4.0.3",
    "ng2-ui-switch": "^1.0.2",
    "ng2-validation": "^4.2.0",
    "ngx-bar-rating": "^1.1.0",
    "ngx-bootstrap": "^4.3.0",
    "ngx-carousel": "^1.3.5",
    "ngx-chips": "^1.9.1",
    "ngx-color-picker": "^5.3.8",
    "ngx-cookie-service": "^11.0.2",
    "ngx-perfect-scrollbar": "^5.3.5",
    "ngx-quill-editor": "^2.2.2",
    "node-sass": "^4.14.1",
    "nouislider": "^11.1.0",
    "popper.js": "^1.16.1",
    "rxjs": "~6.5.4",
    "rxjs-compat": "^6.1.0",
    "screenfull": "^3.3.2",
    "sweetalert2": "^7.19.3",
    "text-mask-addons": "^3.7.2",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.803.24",
    "@angular/cli": "~8.3.23",
    "@angular/compiler-cli": "~8.2.14",
    "@angular/language-service": "~8.2.14",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.1.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ngx-daterangepicker-material": "^2.2.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslib": "^1.10.0",
    "tslint": "~5.11.0",
    "typescript": "~3.5.3"
  }
}

【问题讨论】:

  • 我已经使用最新版本的 npm 安装了角度动画并且也进行了更新,但仍然没有得到解决。
  • 您是否尝试过删除 node_modules 文件夹并重新安装所有软件包?
  • 我已经做过很多次了。

标签: angular


【解决方案1】:

软件包的版本不一致可能存在问题。

你可以试试ng update @angular/core

【讨论】:

  • 即使在这样做之后,我也会遇到与上述相同的错误。
猜你喜欢
  • 2016-12-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-10-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多