gpt4 book ai didi

angular - Bootstrap \SASS : Wrong number of arguments (3 for 2) for `table-row-variant'

转载 作者:行者123 更新时间:2023-12-03 14:48:39 25 4
gpt4 key购买 nike

刚刚更新到 Angular 8,我似乎无法解决这个问题。

这是错误

ERROR in ./src/vendor/styles/bootstrap-material.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/vendor/styles/bootstrap-material.scss)

模块构建失败(来自 ./node_modules/sass-loader/lib/loader.js):

@include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level));
^
`table-row-variant' 的参数数量错误(3 对 2)
在/Users/jasonspick/Projects/Web/FamApp/node_modules/bootstrap/scss/_tables.scss (第 101 行,第 12 列)
src/vendor/libs/hover-dropdown/hover-dropdown.directive.ts(22,5) 中的错误:错误 TS2740:“订阅”类型缺少“EventEmitter<{}>”类型中的以下属性:__isAsync,发出、订阅、观察者和其他 16 个。

这是我的 package.json:
    {
"name": "fam-angular",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "node ./ng-add-pug-loader.js"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.1",
"@angular/common": "^8.0.1",
"@angular/compiler": "^8.0.1",
"@angular/core": "^8.0.1",
"@angular/forms": "^8.0.1",
"@angular/http": "^7.1.4",
"@angular/platform-browser": "^8.0.1",
"@angular/platform-browser-dynamic": "^8.0.1",
"@angular/router": "^8.0.1",
"@auth0/angular-jwt": "^2.1.0",
"@ng-bootstrap/ng-bootstrap": "4.0.1",
"@ng-select/ng-select": "^2.13.3",
"@ngx-translate/core": "^11.0.1",
"@reactivex/rxjs": "^5.5.12",
"@swimlane/ngx-datatable": "^13.1.0",
"angular-calendar": "~0.25.2",
"angular2-ladda": "^2.0.0",
"bootstrap": "^4.1.3",
"chart.js": "^2.7.3",
"core-js": "^2.6.1",
"ng-autosize": "~1.1.0",
"ng-bootstrap": "^1.6.3",
"ng-cli-pug-loader": "^0.2.0",
"ng2-archwizard": "~2.1.0",
"ng2-charts": "^2.0.0-beta.21",
"ng2-nouislider": "~1.7.7",
"ngx-chips": "~1.9.1",
"ngx-dropzone-wrapper": "~6.1.0",
"ngx-mask": "^6.5.18",
"ngx-perfect-scrollbar": "~6.2.0",
"ngx-swiper-wrapper": "~6.2.1",
"ngx-toastr": "^9.1.1",
"node-sass": "^4.12.0",
"plyr": "~2.0.18",
"quill": "~1.3.6",
"rxjs": "^6.5.2",
"spinkit": "~1.2.5",
"update": "^0.7.4",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.3",
"@angular/cli": "^8.0.3",
"@angular/compiler-cli": "^8.0.1",
"@angular/language-service": "^8.0.1",
"@types/jasmine": "^2.8.14",
"@types/jasminewd2": "^2.0.6",
"@types/node": "^8.10.39",
"apply-loader": "^2.0.0",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.1.0",
"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",
"protractor": "^5.4.2",
"pug": "^2.0.3",
"pug-loader": "^2.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "3.4.5"
}
}

我没有看到任何东西。有没有人在更新过程中遇到这个问题?

谢谢!

最佳答案

好的,所以我在我的情况下想通了:我正在升级一个旧项目以使用最新的库,这是弹出的错误之一。问题是我的项目是单独@importing bootstrap scss 文件,如下所示:

@import 'node_modules/bootstrap/scss/root';
@import 'node_modules/bootstrap/scss/print';
@import 'node_modules/bootstrap/scss/reboot';
[...]

当我用单个 @imports 替换所有这些 @imports 时,问题就消失了(这反过来又导入了当前引导版本的所有正确文件):
@import 'node_modules/bootstrap/scss/bootstrap';

希望这对某人有所帮助,网络上几乎没有关于此错误的信息。

关于angular - Bootstrap \SASS : Wrong number of arguments (3 for 2) for `table-row-variant' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56640064/

25 4 0