【问题标题】:Mixins may not be defined within control directives or other mixinsMixin 不能在控制指令或其他 mixin 中定义
【发布时间】:2018-10-05 11:59:40
【问题描述】:

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

错误 ./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 模块构建失败:
未定义
^
Mixin 不能在控制指令或其他 mixin 中定义。
在 D:\DailyJS\CIDE_SCHOOL_DEV\node_modules\@angular\material_theming.scss (第 2440 行,第 10 列)
错误:
未定义
^
Mixin 不能在控制指令或其他 mixin 中定义。
在 D:\DailyJS\CIDE_SCHOOL_DEV\node_modules\@angular\material_theming.scss (第 2440 行,第 10 列)
在 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: 编译失败。

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

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

不能在控制指令或其他 mixin 中定义 Mixin。

【问题讨论】:

    标签: node-sass


    【解决方案1】:

    现在,我发现解决方案是 node-sass pacakge 存在问题。 所以安装

    npm i node-sass@4.8.1

    打包然后就可以了。

    【讨论】:

    • 它现在可以工作了,并且发现包很好。谢谢。
    猜你喜欢
    • 1970-01-01
    • 2016-08-15
    • 2015-09-24
    • 1970-01-01
    • 2018-07-11
    • 2020-09-16
    • 1970-01-01
    • 2014-02-01
    • 2016-12-11
    相关资源
    最近更新 更多