Lesshat安装不正确

Hum*_*mus 1 css less ghost-blog

我正在按照教程从webtuts构建一个鬼主题(http://webdesign.tutsplus.com/tutorials/cms-tutorials/styling-our-ghost-theme-with-less/),但是偶然发现了一个问题.

我已经按照所有步骤正确安装了grunt和bower - grunt导致了一个问题但是我使用了sudo命令来绕过它.

当我尝试编辑layout.less并保存它时,在watch命令运行时,我收到以下错误:

 >> File "LESS/layout.less" changed.

Running "less:components" (less) task
>> FileError: 'lesshat.less' wasn't found in LESS/less_imports.less on line 2, column 1:
>> 1 //Make lesshat mixin library available
>> 2 @import 'lesshat.less';
>> 3
Warning: Error compiling LESS. Use --force to continue.

Aborted due to warnings.
Run Code Online (Sandbox Code Playgroud)

我从我下载的文件替换了lesshat文件但是仍然出现错误.

任何帮助将非常感激!

谢谢

fat*_*gns 5

我遇到了同样的错误.检查文件夹UberThemeStyles> bower_components> lesshat.检查那里是否有lesshat.less文件.

然后转到UberThemeStyles> LESS的less_imports.less文件.

改变第2行来自

@import 'lesshat.less';
Run Code Online (Sandbox Code Playgroud)

@import '../bower_components/lesshat/lesshat.less';
Run Code Online (Sandbox Code Playgroud)

然后再次运行grunt watch.

希望这可以帮助!