最近对High Sierra的OS更新后。我遇到了SASS和Grunt的问题。
当我运行grunt
Running "sass:compressed" (sass) task
Traceback (most recent call last):
2: from /usr/local/bin/sass:22:in `<main>'
1: from /usr/local/Cellar/ruby/2.5.0/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/usr/local/Cellar/ruby/2.5.0/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem sass (>= 0.a) with executable sass (Gem::GemNotFoundException)
我尝试更新ruby并重新安装grunt:
> npm install grunt --save-dev
npm WARN grunt-contrib-imagemin@0.1.4 requires a peer of grunt@~0.4.0 but none was installed.
npm WARN grunt-contrib-sass@0.4.1 requires a peer of grunt@~0.4.0 but none was installed.
npm WARN grunt-contrib-uglify@0.2.7 requires a peer of grunt@~0.4.0 but none was installed.
npm WARN grunt-contrib-watch@0.4.4 requires a peer of grunt@~0.4.0 but none was installed.
npm WARN wb2012@0.0.0 No license field.
答案 0 :(得分:12)
不确定原因,但我必须重新安装sass while True:
try:
writer.save()
os.startfile(company_code_choice + 'PLFY2018.xlsx')
break
except:
print "Close the file!"
并修复它。
答案 1 :(得分:0)
此sudo gem install sass -n /usr/local/bin
为我修复了该问题!