本文介绍了模块构建失败(来自./node_modules/sass-loader/dist/cjs.js)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Windows 10上运行我的angular 9应用程序,但是在尝试在本地提供服务时遇到以下错误.看看下面的错误:
I'm trying to run my angular 9 app on windows 10 but getting the following error while trying to serve it locally. Have a look at the error below:
pickandpay.scss:
pickandpay.scss:
// Core CSS
@import "pickandpay/base";
@import "pickandpay/blog-details";
@import "pickandpay/blog-sidebar";
@import "pickandpay/blog";
@import "pickandpay/breadcrumb";
@import "pickandpay/checkout";
@import "pickandpay/contact";
@import "pickandpay/footer";
@import "pickandpay/header";
@import "pickandpay/hero";
@import "pickandpay/home-page";
@import "pickandpay/mixins";
@import "pickandpay/responsive";
@import "pickandpay/shop-details";
@import "pickandpay/shop-grid";
@import "pickandpay/shoping-cart";
@import "pickandpay/sidebar";
@import "pickandpay/variable";
@import "pickandpay/style.scss";
_base.scss:
_base.scss:
html,
body {
height: 100%;
font-family: 'Cairo', sans-serif;
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
color: #111111;
font-weight: 400;
font-family: 'Cairo', sans-serif;
}
h1 {
font-size: 70px;
}
h2 {
font-size: 36px;
}
h3 {
font-size: 30px;
}
h4 {
font-size: 24px;
}
h5 {
font-size: 18px;
}
h6 {
font-size: 16px;
}
p {
font-size: 16px;
font-family: 'Cairo', sans-serif;
color: #6f6f6f;
font-weight: 400;
line-height: 26px;
margin: 0 0 15px 0;
}
img {
max-width: 100%;
}
input:focus,
select:focus,
button:focus,
textarea:focus {
outline: none;
}
a:hover,
a:focus {
text-decoration: none;
outline: none;
color: $white-color;
}
ul,
ol {
padding: 0;
margin: 0;
}
/*---------------------
Helper CSS
-----------------------*/
.section-title {
margin-bottom: 50px;
text-align: center;
h2 {
color: $normal-color;
font-weight: 700;
position: relative;
&:after {
position: absolute;
left: 0;
bottom: -15px;
right: 0;
height: 4px;
width: 80px;
background: $primary-color;
content: "";
margin: 0 auto;
}
}
}
.set-bg {
background-repeat: no-repeat;
background-size: cover;
background-position: top center;
}
.spad {
padding-top: 100px;
padding-bottom: 100px;
}
.text-white h1,
.text-white h2,
.text-white h3,
.text-white h4,
.text-white h5,
.text-white h6,
.text-white p,
.text-white span,
.text-white li,
.text-white a {
color: #fff;
}
/* buttons */
.primary-btn {
display: inline-block;
font-size: 14px;
padding: 10px 28px 10px;
color: $white-color;
text-transform: uppercase;
font-weight: 700;
background: $primary-color;
letter-spacing: 2px;
}
.site-btn {
font-size: 14px;
color: $white-color;
font-weight: 800;
text-transform: uppercase;
display: inline-block;
padding: 13px 30px 12px;
background: $primary-color;
border: none;
}
/* Preloder */
#preloder {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 999999;
background: #000;
}
.loader {
width: 40px;
height: 40px;
position: absolute;
top: 50%;
left: 50%;
margin-top: -13px;
margin-left: -13px;
border-radius: 60px;
animation: loader 0.8s linear infinite;
-webkit-animation: loader 0.8s linear infinite;
}
@keyframes loader {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
border: 4px solid #f44336;
border-left-color: transparent;
}
50% {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
border: 4px solid #673ab7;
border-left-color: transparent;
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
border: 4px solid #f44336;
border-left-color: transparent;
}
}
@-webkit-keyframes loader {
0% {
-webkit-transform: rotate(0deg);
border: 4px solid #f44336;
border-left-color: transparent;
}
50% {
-webkit-transform: rotate(180deg);
border: 4px solid #673ab7;
border-left-color: transparent;
}
100% {
-webkit-transform: rotate(360deg);
border: 4px solid #f44336;
border-left-color: transparent;
}
}
我尝试使用Google搜索,并对此进行了所有处理,但未找到任何解决方案.
I tried googling it and do everything about it but didn't find any solution.
节点-v12.16.1
node -v12.16.1
Angular CLI版本9.1.4
Angular CLI version 9.1.4
推荐答案
似乎您尚未定义变量 $ white-color
.如果您想获得更多的深入帮助,则可以提供 pickandpay.scss
文件.
It seems like you have not defined the variable $white-color
. If you want more in depth help it would help if you provided the pickandpay.scss
file.
这篇关于模块构建失败(来自./node_modules/sass-loader/dist/cjs.js)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!