npm运行脚本构建成功,sencha应用程序构建失败?

时间:2020-06-09 11:20:25

标签: extjs sencha-cmd

sencha app build命令失败,其中 npm run-script build可以。知道为什么吗?

我创建了这个仓库来举例说明问题。 https://github.com/klodoma/extjs-playground

cd modern-app
npm install -D
npm run //works well
npm run-script build //works well
cd modern-app
npm install -D
sencha app watch //works well
sencha app build //fails
d:\Projects.play\extjs-playground\modern-app>npm run-script build

> modern-app@0.0.1 build d:\Projects.play\extjs-playground\modern-app
> npm run clean && cross-env webpack --env.profile=desktop --env.environment=production --env.treeshake=yes


> modern-app@0.0.1 clean d:\Projects.play\extjs-playground\modern-app
> rimraf build

i [ext]: ext-webpack-plugin v7.2.0, Ext JS v7.2.0 Commercial Edition, Sencha Cmd v7.2.0.84, webpack v4.39.3n/a
i [ext]: Starting production build for extjs
i [ext]: Processing Build Descriptor : desktop (production environment)
i [ext]: Loading compiler context
i [ext]: Loading app json manifest...
i [ext]: Processing data with CmdJavascriptCompressor
i [ext]: Writing concatenated output to file \build\production\ModernApp\generatedFiles\desktop\app.js
i [ext]: Writing content to \build\temp\production\ModernApp\slicer-temp\bootstrap.json
i [ext]: Writing content to \build\temp\production\ModernApp\slicer-temp\bootstrap.js
i [ext]: Writing content to \build\production\ModernApp\generatedFiles\desktop.json
i [ext]: Fashion build complete for \build\temp\production\ModernApp\sass\ModernApp-all.scss
i [ext]: Fashion build completed in 1.457 sec.
i [ext]: Writing content to \build\production\ModernApp\generatedFiles\desktop.json
i [ext]: Writing content to \build\production\ModernApp\microloader.js
i [ext]: Appending content to \build\production\ModernApp\microloader.js
i [ext]: Writing content to \build\production\ModernApp\index.html
i [ext]: Ending production build for extjs

node process and sencha cmd process ended

d:\Projects.play\extjs-playground\modern-app>sencha app build
Wat!
configFile: d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\sencha.cfg
Sencha Cmd v7.2.0.84
[INF] Processing Build Descriptor : desktop (production environment)
[INF] Loading compiler context
[INF] Loading app json manifest...
[INF] Processing data with CmdJavascriptCompressor
[INF] JavaScript input level is NEXT and output level is ES5
[INF] Writing concatenated output to file d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\generatedFiles\desktop\app.js
[INF] merging 374 input resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\desktop\resources
[INF] merged 1 resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\desktop\resources
[INF] merging 25 input resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp
[INF] merged 1 resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp
[INF] Writing content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\slicer-temp\bootstrap.json
[INF] Writing content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\slicer-temp\bootstrap.js
[INF] writing sass content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss.tmp
[INF] appending sass content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss.tmp
[INF] appending sass content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss.tmp
[INF] Writing content to d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\generatedFiles\desktop.json
[LOG] Fashion build starting for d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss
[LOG] Fashion build complete for d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss
[LOG] Fashion build completed in 1.419 sec.
[INF] Copying page resources to d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\modern-app (The system cannot find the file specified)
[ERR]
[ERR] Total time: 10 seconds

[ERR] D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\plugin.xml:333: The following error occurred while executing this line:
D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\ant\build\app\build-impl.xml:405: The following error occurred while executing this line:
D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\ant\build\app\page-impl.xml:256: com.sencha.exceptions.BasicException: d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\modern-app (The system cannot find the file specified)
[ERR] A log is available in the file "D:\Projects.play\extjs-playground\modern-app\sencha-error-20200609.log"

进行一些搜索后,问题出在modern-app/node_modules/@sencha/cmd/dist/ant/build/app/page-impl.xml文件中:

    <target name="-copy-app-resources" depends="-init-compiler">
        <x-compile refid="${compiler.ref.id}">
            <![CDATA[
            app-resources
                -compress=${enable.resource.compression}
                -out=${build.out.base.path}
            ]]>
        </x-compile>
    </target>

更详细的日志sencha --info app build

d:\Projects.play\extjs-playground\modern-app>sencha --info app build
Wat!
configFile: d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\sencha.cfg
Sencha Cmd v7.2.0.84
[INF] Processing Build Descriptor : desktop (production environment)
[INF]
[INF] init-plugin:
[INF]
[INF] cmd-root-plugin.init-properties:
[INF]
[INF] init-properties:
[INF]
[INF] init-sencha-command:
[INF]
[INF] init:
[INF]
[INF] app-build-impl:
[INF]
[INF] -before-init-local:
[INF]
[INF] -init-local:
[INF]
[INF] -after-init-local:
[INF]
[INF] init-local:
[INF]
[INF] init-cmd:
[INF]      [echo] Using Sencha Cmd from D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist for d:\Projects.play\extjs-playground\modern-app\build.xml
[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] Adding antlib taskdef for com/sencha/tools/fashion/ant/antlib.xml
[INF]
[INF] -after-init:
[INF]
[INF] -before-init-defaults:
[INF]
[INF] -init-defaults:
[INF]
[INF] -after-init-defaults:
[INF]
[INF] -init-compiler:
[INF]
[INF] -init-native-package:
[INF]
[INF] init:
[INF]
[INF] -before-build:
[INF]
[INF] refresh:
[INF]
[INF] -before-refresh:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -init-app-js-files:
[INF] Loading compiler context
[INF] Loading app json manifest...
[INF] Loading classpath entry D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\ant\build\app\Boot.js
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-core\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-core\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\treegrid\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern-theme-base\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern-theme-base\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-font-awesome\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-font-awesome\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-font-ext\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-font-ext\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern-theme-neptune\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern-theme-neptune\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern-theme-material\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\ext-modern-theme-material\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\app\shared\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\app\desktop\overrides
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\app\shared\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\app\desktop\src
[INF] Loading classpath entry d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sencha-compiler\app
[INF]
[INF] -detect-app-build-properties:
[INF]
[INF] -refresh-app:
[INF]
[INF] -refresh:
[INF]
[INF] -after-refresh:
[INF]
[INF] resolve:
[INF]
[INF] js:
[INF]
[INF] -before-js:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -init-app-js-files:
[INF]
[INF] -detect-app-build-properties:
[INF]
[INF] -compile-js:
[INF] optimizing Ext.baseCssPrefix...
[INF] Loading classpath entry D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\plugins\src
[INF] Loading classpath entry D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\plugins\ext\src
[INF] Loading classpath entry D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\plugins\ext\current\src
[INF] optimizing callParent / callSuper usages...
[INF] preprocessing class definitions for optimizations...
[INF] rewriting class definitions...
[INF] optimizing property names for compressor compatibility...
[INF] concatenating files...
[INF] Processing data with CmdJavascriptCompressor
[INF] JavaScript input level is NEXT and output level is ES5
[INF] Writing concatenated output to file d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\generatedFiles\desktop\app.js
[INF]
[INF] -js:
[INF]
[INF] -after-js:
[INF]
[INF] resources:
[INF]
[INF] -before-resources:
[INF]
[INF] -before-inherit-resources:
[INF]
[INF] -before-copy-resources:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -resources:
[INF] merging 374 input resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\desktop\resources
[INF] merged 1 resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\desktop\resources
[INF] merging 25 input resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp
[INF] merged 1 resources into d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp
[INF]
[INF] -after-copy-resources:
[INF]
[INF] -after-inherit-resources:
[INF]
[INF] -after-resources:
[INF]
[INF] slice:
[INF]
[INF] sass:
[INF]
[INF] -before-sass:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -init-app-js-files:
[INF]
[INF] -detect-app-build-properties:
[INF]
[INF] -generate-slicer-bootstrap:
[INF]
[INF] -generate-slicer-manifest:
[INF] Writing content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\slicer-temp\bootstrap.json
[INF] Writing content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\slicer-temp\bootstrap.js
[INF]
[INF] -load-sass-page:
[INF]
[INF] -compass-compile-theme-package:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -init-app-js-files:
[INF]
[INF] -compile-sass:
[INF] writing sass content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss.tmp
[INF] appending sass content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss.tmp
[INF] appending sass content to d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss.tmp
[INF] Writing content to d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\generatedFiles\desktop.json
[LOG] Fashion build starting for d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss
[LOG] Fashion build complete for d:\Projects.play\extjs-playground\modern-app\build\temp\production\ModernApp\sass\ModernApp-all.scss
[LOG] Fashion build completed in 1.487 sec.
[INF] srcfile: d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\desktop\resources\css-vars.js (249050 bytes)
[INF] outfile: d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\desktop\resources\css-vars.js
[INF] Compressed size 98943 bytes. Saved 150107 bytes (60 %)
[INF]
[INF] -compass-compile-theme-folders:
[INF]
[INF] -compass-compile-sass-dir:
[INF]
[INF] -compass-compile:
[INF]
[INF] -sass:
[INF]
[INF] -after-sass:
[INF]
[INF] -before-init-local:
[INF]
[INF] -init-local:
[INF]
[INF] -after-init-local:
[INF]
[INF] init-local:
[INF]
[INF] init-cmd:
[INF]      [echo] Using Sencha Cmd from D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist for d:\Projects.play\extjs-playground\modern-app\build.xml
[INF]
[INF] -before-init:
[INF]
[INF] -after-init:
[INF]
[INF] -before-init-defaults:
[INF]
[INF] -init-defaults:
[INF]
[INF] -after-init-defaults:
[INF]
[INF] -init-native-package:
[INF]
[INF] init:
[INF]
[INF] refresh:
[INF]
[INF] -before-refresh:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -init-app-js-files:
[INF]
[INF] -detect-app-build-properties:
[INF]
[INF] -refresh-app:
[INF]
[INF] -refresh:
[INF]
[INF] -after-refresh:
[INF]
[INF] page:
[INF]
[INF] -before-page:
[INF]
[INF] -init:
[INF]
[INF] -init-compiler:
[INF]
[INF] -copy-app-resources:
[INF] Copying page resources to d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp
[INF] compressing d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\modern-app
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\modern-app (The system cannot find the file specified)
[ERR]
[ERR] Total time: 10 seconds

[ERR] D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\plugin.xml:333: The following error occurred while executing this line:
D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\ant\build\app\build-impl.xml:405: The following error occurred while executing this line:
D:\Projects.play\extjs-playground\modern-app\node_modules\@sencha\cmd\dist\ant\build\app\page-impl.xml:256: com.sencha.exceptions.BasicException: d:\Projects.play\extjs-playground\modern-app\build\production\ModernApp\modern-app (The system cannot find the file specified)
[ERR] A log is available in the file "D:\Projects.play\extjs-playground\modern-app\sencha-error-20200609-1.log"

0 个答案:

没有答案