【发布时间】:2018-01-20 22:41:28
【问题描述】:
我正在尝试学习 laravel 并在 Windows 10 上使用 composer 建立一个新项目
如果我尝试编译
资源\资产\sass\app.scss
我收到以下错误
Compilation Error
Error: File "c:\Users\Michael\www\demolaravel\resources\assets\sass\node_modules\bootstrap-sass\assets\stylesheets\bootstrap" not found
on line 9 of sass/c:\Users\Michael\www\demolaravel\resources\assets\sass\app.scss
>> @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
为什么他抱怨那个目录 - app.css(至少这个特定的行)也是原创的。这是 composer 安装它的方式。
// Fonts
@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
// Variables
@import "variables";
// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
body{
padding-top: 80px;
}
我只是在最后添加了正文选择器 我使用 Visual Studio 代码和实时 sass 编译器扩展。但我也试过 Scout-App 还尝试放置绝对路径,但没有任何效果:(
【问题讨论】:
-
您是否在项目中使用
npm install安装了依赖项? -
不,我忘了。将此作为答案,我接受