从ExtJS 4.2.1升级到ExtJS 5时,为什么会出现错误?

时间:2014-06-02 16:48:33

标签: extjs sencha-cmd

我执行了ExtJS 5升级指南中指定的以下内容:

sencha app upgrade -ext

我得到了这个输出错误:

sencha app upgrade -ext
Sencha Cmd v5.0.0.160
[INF] Downloading ext package...
[INF] Source File : http://cdn.sencha.com/cmd/packages/e....0.970/ext.pkg
[INF] Downloading : ....................
[INF] Extracting ext package...
[INF] Package is already local: ext/5.0.0.970
[INF] Extracting : ....................
[INF] Loading configuration for framework directory: C:\Sencha\Cmd\repo\extract\ext\5.0.0.970
[INF] Removing existing framework at C:\atlantis\amc\gui\src\main\ext
[INF] upgrading application
[INF] Upgrading to sdk at C:\atlantis\amc\gui\src\main\ext
[INF] Updating application and workspace from Ext JS 4.2.1.883 / Cmd 4.0.2.67
[WRN] Use merge tool to resolve conflict: C:\atlantis\amc\gui\src\main\usx\.sencha\app\sencha.cfg
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: Failed creating background process
[ERR]
[ERR] Total time: 1 second
[ERR] org.mozilla.javascript.WrappedException: Wrapped com.sencha.exceptions.BasicException: com.sencha.exceptions.ExProcess: Failed creating background process
(C:\Sencha\Cmd\5.0.0.160\ant\ant-util.js#849)
[ERR]
The application was last modified by an older version of Sencha Cmd (4.0.2.67)
the current is 5.0.0.160.
Please run "sencha app upgrade" to update to 5.0.0.160.

当我执行简单的" sencha app upgrade"我明白了:

Sencha Cmd v5.0.0.160
[INF] upgrading application
[INF] Upgrading to sdk at C:\atlantis\amc\gui\src\main\ext
[INF] Updating application and workspace from Ext JS 4.2.1.883 / Cmd 3.0.0.250
[ERR] org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (anonymous#336)
[ERR]
The application was last modified by an older version of Sencha Cmd (0.0.0.0)
the current is 5.0.0.160.
Please run "sencha app upgrade" to update to 5.0.0.160. 

3 个答案:

答案 0 :(得分:4)

尝试将app.cmd.version = 3.0.0.250(或 正在运行的任何版本的cmd)添加到应用的sencha.cfg文件中。这对我有用。

答案 1 :(得分:0)

虽然我不知道为什么,但我也将上述错误从Ext 5 Beta升级到GA,唯一的方法是重新生成应用程序(sencha generate app ...)并手动将文件复制到新的生成文件夹结构。

答案 2 :(得分:0)

在Linux上它默认在/root/.bashrc中定义它(不知道为什么它说3_0_0):

export PATH=/root/bin/Sencha/Cmd/5.0.0.160:$PATH
export SENCHA_CMD_3_0_0="/root/bin/Sencha/Cmd/5.0.0.160"
Windows上的

...转到"系统设置" - > "高级" - > "环境变量......"

并在那里定义(然后可以简单地键入" sencha"并且它将被知道)。

如果安装程序没有正常运行(Linux示例):

cd /tmp/sencha1403206728375
./SenchaCmd-5.0.0.160-linux-x64.run
cd .. && rm -R ./sencha1403206728375/

我相信安装程序更喜欢从当前目录调用 - 至少在sencha upgrade被卡住时这会有所帮助。

一旦环境更新,需要重新连接(重启?),以扩展PATH规范。使用更新的SenchCmd然后可以使用更新的SDK(似乎向下兼容)。