简体   繁体   English

Sencha Cmd软件包生成不起作用

[英]Sencha Cmd Package Build Not Working

Using SenchaCMD to create a package, I place the source code (some global methods I plan on sharing between my apps) in the src folder and attempt to build. 使用SenchaCMD创建一个程序包,我将源代码(我计划在我的应用程序之间共享的一些全局方法)放在src文件夹中并尝试构建。

I get the following output: 我得到以下输出:

Sencha Cmd v6.0.2.14
[INF] Processing Build Descriptor : default
[INF] Starting server on port : 1841
[INF] Mapping http://localhost:1841/~cmd to /home/spsimmons/bin/Sencha/Cmd/6.0.2.14...
[INF] Mapping http://localhost:1841/ to /var/www/CpsWebApp/apps...
[INF] Package web server available at http://localhost:1841
[INF] Writing concatenated output to file /var/www/CpsWebApp/apps/packages/local/global/build/global-debug.js
[INF] Compressing data with YuiJavascriptCompressor
[INF] Writing concatenated output to file /var/www/CpsWebApp/apps/packages/local/global/build/global.js
[INF] merging 1 input resources into /var/www/CpsWebApp/apps/packages/local/global/build/resources
[INF] merged 1 resources into /var/www/CpsWebApp/apps/packages/local/global/build/resources
[INF] merging 10 input resources into /var/www/CpsWebApp/apps/packages/local/global/build
[INF] merged 0 resources into /var/www/CpsWebApp/apps/packages/local/global/build
[ERR]
[ERR] BUILD FAILED
[ERR] java.lang.NullPointerException
[ERR]
[ERR] Total time: 2 seconds
[ERR] The following error occurred while executing this line:
/var/www/CpsWebApp/apps/packages/local/global/.sencha/package/build-impl.xml:188: The following error occurred while executing this line:
/var/www/CpsWebApp/apps/packages/local/global/.sencha/package/slice-impl.xml:35: java.lang.NullPointerException

GlobalLib.js: GlobalLib.js:

Ext.define('global.GlobalLib', {
    statics: {
        trim: function(input) {
            return input.replace(/^\s+|\s+$/g, '');
        },
        toUpperCase: function(input) {
            return input.toUpperCase();
        },
        toLowerCase: function(input) {
            return input.toLowerCase();
        },
        toTitleCase: function(input) {
            var smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|vs?\.?|via)$/i;
            return input.replace(/([^\W_]+[^\s-]*) */g, function(match, p1, index, title) {
                if (index > 0 && index + p1.length !== title.length &&
                    p1.search(smallWords) > -1 && title.charAt(index - 2) !== ":" &&
                    title.charAt(index - 1).search(/[^\s-]/) < 0) {
                    return match.toLowerCase();
                }
                if (p1.substr(1).search(/[A-Z]|\../) > -1) {
                    return match;
                }
                return match.charAt(0).toUpperCase() + match.substr(1);
            });
        },
        ...
     }
});

package.json: package.json:

{
    "name": "global",
    "namespace": "global",
    "type": "code",
    "creator": "Shawn P. Simmons",
    "summary": "Global Methods for the CpsWebApp Application",
    "detailedDescription": "Global Methods for the CpsWebApp Application",
    "version": "1.0.0",
    "compatVersion": "1.0.0",
    "format": "1",
    "output": "${package.dir}/build",
    "local": true,
    "sass" : {
        "namespace": "global",
        "etc": "${package.dir}/sass/etc/all.scss,${package.dir}/${toolkit.name}/sass/etc/all.scss",
        "var": "${package.dir}/sass/var,${package.dir}/${toolkit.name}/sass/var",
        "src": "${package.dir}/sass/src,${package.dir}/${toolkit.name}/sass/src"
    },
    "classpath": "${package.dir}/src,${package.dir}/${toolkit.name}/src",
    "overrides": "${package.dir}/overrides,${package.dir}/${toolkit.name}/overrides"
}

sencha.cfg: sencha.cfg:

# The folder that contains sub-packages of this package. Only valid for "framework"
# package type.
#
package.subpkgs.dir=${package.dir}/packages

#==============================================================================
# Custom Properties - Place customizations below this line to avoid merge
# conflicts with newer versions

package.cmd.version=6.0.2.14
package.framework = ext

It's becoming increasingly difficult to write code when I am continually running into show-stoppers like this. 当我不断遇到这样的表演障碍时,编写代码变得越来越困难。 I don't see anything wrong with the configurations, I followed the documentation yet I am unable to complete this task. 我没有发现配置有任何问题,我遵循了文档,但无法完成此任务。 Does anyone have any insight on why this will not build? 是否有人对此为何无法建立有任何见识?

Looks like an internal error in Sencha Cmd while performing "slicing". 在执行“切片”时,看起来像是Sencha Cmd中的内部错误。 As a workaround, you could try skipping the "slice" build phase in your build.properties : 解决方法是,您可以尝试在build.properties跳过“切片”构建阶段:

skip.slice=1

See https://docs.sencha.com/cmd/6.x/advanced_cmd/cmd_build.html#Build_Targets 参见https://docs.sencha.com/cmd/6.x/advanced_cmd/cmd_build.html#Build_Targets

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM