[英]File to import not found or unreadable: SCSS
I am building an angular application. 我正在构建一个角度应用程序。 While trying to import style scss files, I am getting compile error:
尝试导入样式scss文件时,出现编译错误:
File to import not found or unreadable: layout/menu.
找不到或无法读取的导入文件:布局/菜单。
My folder structure is: 我的文件夹结构是:
Insurance\src\shared\styles.scss
and for a scss file that I want to include inside the styles.scss is: 对于要包含在styles.scss中的scss文件,它是:
Insurance\src\shared\styles\layout\_menu.scss
Inside styles.scss I have written: 在styles.scss内部,我写了:
@import "layout/menu";
in my angulaar.json file I have mentioned: 在我的angulaar.json文件中,我提到了:
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/shared/styles.scss"
],
However, when I compile the code it gives the following error: 但是,当我编译代码时,它给出以下错误:
@import "layout/menu";
^
File to import not found or unreadable: layout/menu.
in Insurance\Insurance\src\shared\styles.scss
File to import not found or unreadable: layout/menu.
Not sure why this is happening. 不知道为什么会这样。
Is "styles" a folder within "shared"? “样式”是“共享”中的文件夹吗? If so, you want to say
如果是这样,你想说
@import "/styles/layout/menu";
Otherwise it won't know to look in the styles folder 否则,它将不知道在样式文件夹中查找
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.