我正在尝试使用web-starter-kit。我按照安装说明操作,我收到一个错误日志,解释我不太确定。我还处于入门阶段,我在web-starter-kit / app文件夹中运行gulp错误。我对这项技术缺乏经验,而且我正在使用起始文件夹中包含的默认资源。我在互联网上找不到任何有用的东西。这是错误日志:
[13:26:16] Working directory changed to ~/Desktop/web-starter-kit
[13:26:17] Using gulpfile ~/Desktop/web-starter-kit/gulpfile.js
[13:26:17] Starting 'clean'...
[13:26:17] Finished 'clean' after 4.43 ms
[13:26:17] Starting 'default'...
[13:26:17] Starting 'styles:components'...
[13:26:17] Starting 'styles:scss'...
[13:26:17] Starting 'styles:css'...
[13:26:17] gulp-size: 'styles:css' total 0 B
[13:26:17] Finished 'styles:css' after 94 ms
[13:26:17] gulp-size: 'styles:scss' total 0 B
[13:26:17] Finished 'styles:scss' after 110 ms
[13:26:17] [gulp-ruby-sass]
Syntax error: Mixin "medium" does not accept a content block.
on line 160 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/_utils.scss, in `medium'
from line 160 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/_utils.scss, in `container'
from line 32 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/_global.scss
from line 10 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/components.scss
events.js:72
throw er; // Unhandled 'error' event
^
Error in plugin 'gulp-ruby-sass'
Syntax error: Mixin "medium" does not accept a content block.
on line 160 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/_utils.scss, in `medium'
from line 160 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/_utils.scss, in `container'
from line 32 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/_global.scss
from line 10 of /home/riccardo/Desktop/web-starter-kit/app/styles/components/components.scss
at ChildProcess.<anonymous> (/home/riccardo/Desktop/web-starter-kit/node_modules/gulp-ruby-sass/index.js:98:25)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
我的意思是听起来很奇怪我实际上并没有编写任何实际的代码,并且在一个比我聪明的人编写的代码中存在语法错误,但是我做错了更合理。
答案 0 :(得分:0)
看起来你错过了红宝石的宝石。它为您编译/转换易于阅读的代码到css。
在终端/命令行中,转到项目文件夹并运行gem install sass
。 (假设你安装了ruby)。然后尝试再次运行gulp。
希望有所帮助!