我正在使用Yeoman。升级到优胜美地后,任务grunt server
和grunt build
引发此错误:
/Users/rogerfuentes/Documents/Web/Kelios/test/node_modules/grunt-contrib-compass/node_modules/tmp/lib/tmp.js:261
throw err;
^
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
是什么导致此错误,如何解决?
最佳答案
如果在终端窗口上运行罗盘,将会看到以下错误:
-bash: /usr/bin/compass: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
如果转到
/System/Library/Frameworks/Ruby.framework
,您将看到安装已将Ruby版本更新为2.0。这就是运行指南针失败的原因,因为不再有 ruby 1.8。解决方案是通过运行以下命令在优胜美地上重新安装指南针:
xcode-select --install
sudo gem update --system
sudo gem install compass
关于gruntjs - 更新到优胜美地后,在grunt-contrib-compass中导致此错误的原因是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26423705/