错误:生成 ENOENT:缺少 sass 可执行文件 [英] Error: spawn ENOENT: missing the sass executable

查看:15
本文介绍了错误:生成 ENOENT:缺少 sass 可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 中使用 bash.

I'm using bash in windows.

尝试通过 gulp 运行 sass 编译器命令时出现此错误.我有红宝石&萨斯安装.Sass 在手动运行时运行良好.

Getting this error when trying to run a sass compiler command via gulp. I have Ruby & Sass installed. Sass works fine when running it manually.

Error: spawn ENOENT: missing the sass executable.  Please install sass and make available on your PATH

我已将我的 ruby​​ bin 的目录包含在 PATH 变量中(环境变量中的系统变量).

I have included the directory of my ruby bin in the PATH var (system variables within Enviroment variables).

有人有什么想法吗?

推荐答案

您的 gulp-ruby-sass 任务可能配置为使用 Bundler(gem 依赖管理器)执行 SASS.当您没有安装 Bundler 时,该执行将失败并显示您引用的错误消息.检查参数bundleExec"的任务配置并确保它设置为 false,这样 gulp-ruby-sass 将直接运行 SASS 命令.

Your gulp-ruby-sass task is probably configured to execute SASS using Bundler (a gem dependency manager). When you don't have Bundler installed, that execution will fail with the error message you've quoted. Check your task configuration for the parameter "bundleExec" and make sure it's set to false, that way gulp-ruby-sass will run the SASS command directly.

这篇关于错误:生成 ENOENT:缺少 sass 可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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