【问题标题】:Compass command is not recognized at Command Prompt on Windows 64在 Windows 64 上的命令提示符下无法识别指南针命令
【发布时间】:2015-12-09 18:01:21
【问题描述】:

我已在我的 Windows 64 系统上安装 - 全球咕噜声,凉亭,车把 - 红宝石安装程序 2.2.3 - RubyGems 2.4.8 & gem 安装指南针。 仍然命令提示符无法识别 Compass 命令

它确实识别 Sass --v 是 3.4.18 和 ruby --version 2.2.3p173

我还根据需要设置了环境变量。

关于使用命令提示符为我的项目进行 grunt 构建;收到以下错误。

Running "concurrent:dist" (concurrent) task

警告:命令失败:C:\Windows\system32\cmd.exe /s /c "compass.bat --version" 该系统找不到指定的路径。使用 --force 继续。

我做错了什么?

【问题讨论】:

    标签: node.js sass gruntjs command-prompt compass


    【解决方案1】:

    这是因为grunt-contrib-compass 内部使用的bin-version 依赖存在问题。检查这个问题https://github.com/sindresorhus/bin-version/issues/5

    要解决此问题,请尝试卸载并重新安装 grunt-contrib-compass

    npm uninstall --save-dev grunt-contrib-compass
    npm install --save-dev grunt-contrib-compass
    

    【讨论】:

    • 感谢您的建议。但这没有用。我认为这与 Windows 64 有关
    • 你能在 package.json 中检查 bin-version 依赖的版本吗(它会在 node_modules > grunt-contrib-compass > node_modules > bin-version-check > node_modules > bin-version 文件夹)?
    • 您还可以检查C:\Ruby22-x64\bin 是否存在名为compasscompass.bat 的文件?如果不存在,那么你的机器上没有安装指南针
    • package.json 有这个“bin-version-check”:“^2.0.0”
    • Ruby/bin 文件夹还包含 compass 和 compass.bat
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-11
    • 2021-05-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多