Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 我的应用程序中的角度材质、SCSS配置有问题--_Angular_Typescript_Npm_Sass_Angular Material - Fatal编程技术网

Angular 我的应用程序中的角度材质、SCSS配置有问题--

Angular 我的应用程序中的角度材质、SCSS配置有问题--,angular,typescript,npm,sass,angular-material,Angular,Typescript,Npm,Sass,Angular Material,那么 我在尝试启动angular应用程序时遇到以下错误/警告 ERROR in ./src/styles/styles.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-loade

那么

我在尝试启动angular应用程序时遇到以下错误/警告

    ERROR in ./src/styles/styles.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--13- 
    3!./src/styles/styles.scss) 
    Module build failed (from ./node_modules/sass-loader/lib/loader.js): 

    undefined 
    ^ 
    Undefined operation "rem(1.4) * 13". 
    ╷ 
    1788 │ $button-font-size-dense: $body-font-size-base * 13/14 !default; 
    │ ^^^^^^^^^^^^^^^^^^^^^^^^^ 
    ╵ 
    node_modules\angular-material\angular-material.scss 1788:26 @import 
    src\styles\_material.scss 8:9 @import 
    stdin 1:9 root stylesheet 
    in
    E:\REPRIMX\SellcodesProj_MEAN\ProtikAPPX\BaseSideAPP\BaseSideAPP\node_modules\angular-material\angular-material.scss (line 1788, column 26) 
现在,这是我的_material.scss

@font-face { 
font-family: 'Fontil Sans'; 
src: url('../assets/fonts/FontinSans/Fontin_Sans_R.otf') format('opentype'); 
} 

@import '~@angular/material/prebuilt-themes/indigo-pink.css'; 
@import '~@angular/material/theming'; 


$custom-typography: mat-typography-config( 
$font-family: 'Fontil Sans, monospace', 
$headline: mat-typography-level(32px, 48px, 700), 
$body-1: mat-typography-level(16px, 24px, 500) 
); 
@include angular-material-typography($custom-typography);
我通过npm向我的项目添加了角度材料和角度/主题。 那又怎么样?为什么会失败?我猜我可能需要用角材料替换角材料/材料?这是错的还是别的什么

您是否需要查看我的angular.json以了解更多信息?如果是这样,请让我知道,我会分享

请给我一些提示,
卡住了

似乎您为AngularJS导入了不正确的包,AngularJS的Angular材质

node_modules\**angular-material**\angular-material.scss 1788:26 @import...
如果这是真的,你只需要删除这个包

添加然后添加
@angular/material
@angular/cdk


您可以在(角度材质的新名称)中查看更多详细信息。

您是正确的。我移除了棱角材料并安装了你指出的两个。它起作用了。