Sass Breakpoint causing Grunt error

这一生的挚爱 提交于 2019-12-23 04:52:17

问题


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.

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


回答1:


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).

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.




回答2:


Would suggest to go with NPM breakpoint. For installing:

npm install breakpoint-sass & add require 'breakpoint' in your config.rb file.



来源:https://stackoverflow.com/questions/19575737/sass-breakpoint-causing-grunt-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!