混合指令不能在控制指令或其他混合指令中定义

Mixins may not be defined within control directives or other mixins

我尝试安装 npm 包。所有软件包安装正确。 但是当我尝试使用 npm start 运行 应用程序时,出现以下错误:

ERROR in ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader?{"ident":"postcss"}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./src/styles.scss Module build failed:
undefined
^
Mixins may not be defined within control directives or other mixins.
in D:\DailyJS\CIDE_SCHOOL_DEV\node_modules\@angular\material_theming.scss (line 2440, column 10)
Error:
undefined
^
Mixins may not be defined within control directives or other mixins.
in D:\DailyJS\CIDE_SCHOOL_DEV\node_modules\@angular\material_theming.scss (line 2440, column 10)
at options.error (D:\DailyJS\CIDE_SCHOOL_DEV\node_modules\node-sass\lib\index.js:291:26) @ ./src/styles.scss 4:14-187
@ multi ./node_modules/font-awesome/scss/font-awesome.scss ./src/styles.scss
webpack: Failed to compile.

不知道为什么会这样? 之前我从 Github 克隆了存储库,然后使用 npm install 安装了 npm 包。然后就成功了。

但是今天,它给出了这个错误:

Mixins may not be defined within control directives or other mixins.

现在,我找到了解决方案,node-sass pacakge 有问题。 所以安装

npm i node-sass@4.8.1

打包就可以了。