错误模块构建失败(来自 ./node_modules/sass-loader/lib/loader.js): [英] ERROR in Module build failed (from ./node_modules/sass-loader/lib/loader.js):

查看:76
本文介绍了错误模块构建失败(来自 ./node_modules/sass-loader/lib/loader.js):的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行以下命令:

ng build --prod --aot --base-href ./

并接收;

ERROR in Module build failed (from ./node_modules/sass-loader/lib/loader.js):

$clr-popover-box-shadow-color: rgba(clr-getColor(dark), 0.25);
                              ^
      Argument `$color` of `rgba($color, $alpha)` must be a color
      in /Users/allan/git/dcfrontend/node_modules/@clr/ui/src/utils/_variables.global.scss (line 84, column 32)

我使用的是 Angular 7 和 Clarity 1.04.

I'm on Angular 7 and Clarity 1.04.

从我的 angular.json 中提取:

        "styles": [
          "node_modules/@clr/icons/clr-icons.min.css",
          "node_modules/@clr/ui/clr-ui.min.css",
          "node_modules/prismjs/themes/prism-solarizedlight.css",
          "src/styles.css",
          "node_modules/lato-font/css/lato-font.min.css"
        ],
        "scripts": [
          "node_modules/core-js/client/shim.min.js",
          "node_modules/mutationobserver-shim/dist/mutationobserver.min.js",
          "node_modules/@webcomponents/custom-elements/custom-elements.min.js",
          "node_modules/web-animations-js/web-animations.min.js",
          "node_modules/prismjs/prism.js",
          "node_modules/prismjs/components/prism-typescript.min.js",
          "node_modules/@clr/icons/clr-icons.min.js"
        ]

推荐答案

我也遇到了同样的错误,我通过运行以下 npm 命令解决了这个问题:

I was also getting the same error and i solved it by running the below npm command:

npm rebuild node-sass

这篇关于错误模块构建失败(来自 ./node_modules/sass-loader/lib/loader.js):的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆