Sencha 构建失败的指南针进程以非零代码 1 退出
Posted
技术标签:
【中文标题】Sencha 构建失败的指南针进程以非零代码 1 退出【英文标题】:Sencha build failed compass process exited with non-zero code 1 【发布时间】:2013-04-10 10:16:43 【问题描述】:我正在尝试在 Windows 操作系统上构建我的 Sencha 应用程序,但出现此错误。 我正在尝试使用 sencha 命令 - sencha app build package,但构建失败。 我已经安装了 ant 和 compass
C:\xampp\htdocs\WhatsUnderMe>sencha app build package
Sencha Cmd v3.1.0.256
[INF]
[INF] init-plugin:
[INF]
[INF] init-plugin:
[INF] Invoking plugin (C:\xampp\htdocs\WhatsUnderMe\.sencha\app\plugin.xml) - supported targets: -before-app-build
[INF]
[INF] -before-app-build:
[INF] Invoking plugin (C:\xampp\htdocs\WhatsUnderMe\.sencha\app\plugin.xml) - supported targets: app-build
[INF]
[INF] cmd-root-plugin.init-properties:
[INF]
[INF] init-properties:
[INF]
[INF] init-sencha-command:
[INF]
[INF] init:
[INF]
[INF] -before-app-build:
[INF]
[INF] app-build-impl:
[INF]
[INF] package:
[INF]
[INF] -before-init-local:
[INF]
[INF] -init-local:
[INF]
[INF] -after-init-local:
[INF]
[INF] init-local:
[INF]
[INF] find-cmd:
[INF]
[INF] -before-init:
[INF]
[INF] -init:
[INF] Initializing Sencha Cmd ant environment
[INF] Adding antlib taskdef for com/sencha/command/compass/ant/antlib.xml
[INF]
[INF] -after-init:
[INF]
[INF] init:
[INF]
[INF] -before-build:
[INF]
[INF] sass:
[INF]
[INF] -before-sass:
[INF]
[INF] -sass:
[INF] executing compass using system installed ruby runtime
NoMethodError on line ["23"] of C: undefined method `empty?' for nil:NilClass
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/sass-3.1.7/lib/sass/engine.rb:293:in `_render'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/sass-3.1.7/lib/sass/engine.rb:240:in `render'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:140:in `block (2 leve
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:139:in `block in comp
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/logger.rb:45:in `red'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:138:in `compile'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:118:in `compile_if_re
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:103:in `block (2 leve
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `each'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:101:in `block in run'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:126:in `timed'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/compiler.rb:100:in `run'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/commands/update_project.rb:45:in
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/commands/base.rb:18:in `execute'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/commands/project_base.rb:19:in `e
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:43:in `per
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/bin/compass:44:in `call'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/bin/compass:23:in `load'
C:/Users/Ido Tsuk/bin/Sencha/Cmd/3.1.0.256/extensions/sencha-compass/gems/bin/compass:23:in `<main>'
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: compass process exited with non-zero code : 1
[ERR]
[ERR] Total time: 0 seconds
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
[ERR] C:\xampp\htdocs\WhatsUnderMe\.sencha\app\build-impl.xml:223: com.sencha.exceptions.ExProcess: compass process exited with non-zero code
[ERR]
[ERR] Total time: 1 second
[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
C:\xampp\htdocs\WhatsUnderMe\.sencha\app\build-impl.xml:223: com.sencha.exceptions.ExProcess: compass process exited with non-zero code : 1
我能做些什么来解决它?
【问题讨论】:
【参考方案1】:我在使用 Sencha Touch 2.2、Sencha Cmd 3.1.1.270 和 Ruby 2.x 时遇到了同样的错误。
为了解决这个问题,我卸载了 Ruby 2.x 并安装了 Ruby 1.9.3 http://rubyforge.org/frs/download.php/76798/rubyinstaller-1.9.3-p392.exe
希望这对您有所帮助。否则,您应该提供有关您正在使用的版本的更多详细信息。或者你可以像我一样开始使用最新版本。
【讨论】:
快速提问。只是好奇 - 如果: - 我安装了 Ruby 2.x。 - 然后安装指南针。 - 然后卸载 Ruby 2.x。 - 并安装回 Ruby 1.9.3。问:我需要重新安装指南针吗?这意味着,当我们在 Windows 中卸载 Ruby 时,它是否也会删除所有已安装的包? 我不相信!你是对的。有用。有人知道在模拟器中查看的方法吗?【参考方案2】:安装 1.9.3 ruby 适用于大多数人。对我来说没有用。
我所做的修复它是创建一个新项目并将触摸文件夹和资源复制到我当前的项目中。之后我就可以正常构建了。
【讨论】:
【参考方案3】:在我的项目中,由于许多烦人的原因,我同时使用了两个版本的 Ruby。因此,我希望下一个建议对所有无法删除新版 Ruby 的男人(和女孩)有所帮助:
您需要安装ruby-switch:sudo apt-get install ruby-switch
。
然后查看当前版本:ruby -v
。
显示可用版本列表:ruby-switch --list
。
现在将旧(新)版本设置为默认值:sudo ruby-switch --set ruby2.2
。
查看当前版本:ruby -v
【讨论】:
以上是关于Sencha 构建失败的指南针进程以非零代码 1 退出的主要内容,如果未能解决你的问题,请参考以下文章
命令 PhaseScriptExecution 以非零退出代码失败 - 使用 CocoaPods
Command CompileSwift 在 Xcode 10 中以非零退出代码失败 [重复]