Sass 断点导致 Grunt 错误 [英] Sass Breakpoint causing Grunt error

查看:46
本文介绍了Sass 断点导致 Grunt 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚使用 Mavericks 在我的 MacBook 上进行了全新安装.我正在使用 Yeoman 和 grunt 来编译我的项目.重新安装并从 repo 中拉下代码后,我看到此错误:

Just did a fresh install on my MacBook with Mavericks. I'm using Yeoman and grunt to compile my project. After reinstalling and pull down the code from the repo, I see this error:

Warning: LoadError on line ["55"] of /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb: 
cannot load such file -- app/bower_components/compass-breakpoint/lib/breakpoint

Run with --trace to see the full backtrace Use --force to continue.

我需要在我的 gruntfile.js 中使用 Breakpoint.如果我删除了要求,一切都会按预期编译,没有错误.

I'm requiring Breakpoint in my gruntfile.js. If i remove the require, everything compiles as expected, without errors.

如果我能提供更多详细信息,请告诉我.谢谢

Let me know if I can provide any more details. Thanks

推荐答案

所以这个错误似乎是你没有指向正确的文件引起的(这就是 cannot load such file 错误的意思),因此请仔细检查您的导入路径是否正确,但目前,您必须通过 Ruby Compass 使用 Breakpoint,因为它需要一些 Ruby 代码才能正常运行.随着 Sass 3.3 可用,这个 Ruby 依赖消失了 Breakpoint 得到更新,但它需要一个与 Sass 3.3 兼容的编译器(例如,libsass,什么力量grunt-sass,与 Sass 3.3 不兼容,例如).

So the error appears to be caused by you not pointing to the correct file (that's what the cannot load such file error means), so double check that your import path is correct, but at the moment, you must use Breakpoint through Ruby Compass as it requires a bit of Ruby code in order to function properly. With Sass 3.3 available, this Ruby dependency goes away Breakpoint gets updated, but it will require a compiler compatible with Sass 3.3 (libsass, what powers grunt-sass, is not compatible with Sass 3.3, for instance).

我鼓励你使用 grunt-contrib-compass,使用 Bundler 来管理Ruby 版本依赖,并通过 Ruby Compass 编译.这些步骤应该可以解决您的问题.

I would encourage you to use grunt-contrib-compass, use Bundler to manage Ruby version dependencies, and compile through Ruby Compass. These steps should resolve your issues.

这篇关于Sass 断点导致 Grunt 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆