[SOLVED] Build extjs for production on container fails

Issue

This Content is from Stack Overflow. Question asked by Fernando

we are trying to create a container that we can use to build an extjs application.

Or Docker file looks like this:

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

After build the image, we create a container, we check out our code and we run:

$ /root/bin/Sencha/Cmd/sencha app build development

This is all good; but when we run:

$ /root/bin/Sencha/Cmd/sencha app build production

If fails with the following error:

[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"



Solution

The ..\ext\build files that are part of an app created with the extjs framework were missing in our repository. Once these files were added, the build worked fine.


This Question was asked in StackOverflow by Fernando and Answered by Fernando It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?