我们正在尝试创建一个容器,可以用来构建一个extjs应用程序。
或者Docker文件如下所示:
FROM ubuntu:18.04
RUN apt update -y
RUN apt install git -y
RUN apt install openjdk-8-jdk -y
RUN apt install unzip -y
RUN apt install curl -y
COPY cmd-7.4.0.39-linux-64-no_jre.zip .
RUN unzip cmd-7.4.0.39-linux-64-no_jre.zip
RUN chmod +x SenchaCmd-7.4.0.39-linux-amd64.sh
RUN ./SenchaCmd-7.4.0.39-linux-amd64.sh -q -a
RUN rm SenchaCmd-7.4.0.39-linux-amd64.sh
RUN rm cmd-7.4.0.39-linux-64-no_jre.zip构建映像之后,我们创建一个容器,签出代码,然后运行:
$ /root/bin/Sencha/Cmd/sencha app build development这一切都很好,但当我们逃跑时:
$ /root/bin/Sencha/Cmd/sencha app build production如果失败,则出现以下错误:
[ERR] loading page file:///root/bin/Sencha/Cmd/7.4.0.39/ant/build/slicer/theme.html?_baseDir=%2Fdesktop-client%2Fsrc%2Fbuild%2Ftemp%2Fproduction%2FMyAppName%2Fslicer-temp
setting base href to : file:///desktop-client/src/build/temp/production/MyAppName/slicer-temp/
== Unhandled Error ==
TypeError: undefined is not a function (evaluating '''Ext.define''')
file:///desktop-client/src/ext/classic/theme-neptune/overrides/Component.js:1 in global code
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMetho
[ERR] dAccessorImpl.java:62)
[ERR]
[ERR] Total time: 17 seconds
[ERR] /root/bin/Sencha/Cmd/7.4.0.39/plugin.xml:333: The following error occurred while executing this line:
/root/bin/Sencha/Cmd/7.4.0.39/ant/build/app/build-impl.xml:341: The following error occurred while executing this line:
/root/bin/Sencha/Cmd/7.4.0.39/ant/build/app/slice-impl.xml:378: The following error occurred while executing this line:
/root/bin/Sencha/Cmd/7.4.0.39/ant/build/app/slice-impl.xml:379: The following error occurred while executing this line:
/root/bin/Sencha/Cmd/7.4.0.39/ant/build/app/slice-impl.xml:220: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
[ERR] A log is available in the file "/desktop-client/src/sencha-error-20220919.log"发布于 2022-09-19 02:54:14
我们的存储库中缺少了使用extjs框架创建的应用程序的一部分..\ext\build文件。一旦添加了这些文件,构建就可以正常工作了。
https://stackoverflow.com/questions/73767581
复制相似问题