
Originally Posted by
richardvd
It's using the wrong paths for your purpose, causing a HTTP 404 error on the CSS files.
Thanks for the response.
Would you be able to explain why, by default, the simplest 3 commands do not generate a working app? Is there a "best practices" for literally starting fresh?
It seems errors based on various CMD versions are different, and despite my best efforts, I can not find one single source or document that indicates how to "step 1, step 2, step 3" boom get a working site, including the "getting started" documentation for various versions of extjs.
Following this site will not produce a working app using the following steps
https://docs.sencha.com/cmd/guides/extjs/cmd_app.html
(uninstall all previous versions, trash every folder structure in existence, install / copy fresh, ground up)
Install CMD 6.5
(i again have to create my user PATH env var)
Fresh copy 6.0.1 gpl
(version ok)
Code:
sencha -sdk C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1 generate app MyApp C:\Users\xxxxxxx\bin\Sencha\sites\
Code:
[INF] XTemplate Error: "frameworkIsV65" is not defined.
classic:
Code:
[WRN] Use of 'require()' will be deprecated: C:/Users/xxxxxxx/bin/Sencha/sites/ext/classic/theme-neutral/sass/etc/mixins/font-icon.scss:1
[WRN] Use @import instead
modern:
Code:
[WRN] Use of 'require()' will be deprecated: C:/Users/xxxxxxx/bin/Sencha/sites/ext/modern/theme-base/sass/etc/mixins/font-icon.scss:5
[WRN] Use @import instead
sencha app build
[code]
Code:
[WRN] Use of 'require()' will be deprecated: C:/Users/xxxxxxx/bin/Sencha/sites/ext/classic/theme-neutral/sass/etc/mixins/font-icon.scss:1
[WRN] Use @import instead
[LOG] Fashion build starting for C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\production\MyApp\slicer-temp\MyApp-example.scss
[LOG] Fashion build complete for C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\production\MyApp\slicer-temp\MyApp-example.scss
[LOG] Fashion build completed in 2.128 sec.
[INF] Capturing theme image
[ERR] loading page file:///C%3A/Users/xxxxxxx/bin/Sencha/Cmd/6.5.0.180/ant/build/slicer/theme.html?_baseDir=file%3A%2F%2F%2FC%3A%2FUsers%2FE069113%2Fb
in%2FSencha%2Fsites%2Fbuild%2Ftemp%2Fproduction%2FMyApp%2Fslicer-temp
setting base href to : file:///C:/Users/xxxxxxx/bin/Sencha/sites/build/temp/production/MyApp/slicer-temp/
== Unhandled Error ==
TypeError: undefined is not a constructor (evaluating '''Ext.define''')
file:///C:/Users/xxxxxxx/bin/Sencha/sites/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 com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvo
[ERR] ker.java:175)
[ERR]
[ERR] Total time: 20 seconds
[ERR] The following error occurred while executing this line:
C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\build-impl.xml:340: The following error occurred while executing this line:
C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\slice-impl.xml:366: The following error occurred while executing this line:
C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\slice-impl.xml:367: The following error occurred while executing this line:
C:\Users\xxxxxxx\bin\Sencha\sites\.sencha\app\slice-impl.xml:208: com.sencha.exceptions.ExProcess: phantomjs process exited with code 2
Ooook, go back to beginning. Trash /sites/ dir.
Code:
C:\Users\xxxxxxx\bin>sencha generate app -ext MyApp C:\Users\xxxxxxx\bin\Sencha\sites\
Sencha Cmd v6.5.0.180
[INF] Downloading package "[email protected]"
[INF] Downloading : ....................
[INF] Extracting package "[email protected]"
[INF] Package is already local: ext/6.0.0.640
In addition, also receive the XTemplate and require() warnings. Why the old version?
sencha app build
Same warnings, but sucessful. Basic site loads at local host. Ok, let's trash \sites\ and try now with the templates.
sencha generate app -ext -s C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1\templates\admin-dashboard Admin C:\Users\xxxxxxx\bin\Sencha\admin
Code:
[ERR] Failed to resolve dependency Ext.panel.Panel for file Admin.view.profile.Social
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel.Panel
[ERR] at org.apache.tools.ant.Task.perform(Task.java:34
[ERR] 8)
[ERR]
[ERR] Total time: 2 seconds
[ERR]
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
[ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\build-impl.xml:381: The following error occurred while executing this line:
[ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel
.Panel
[ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\build-impl.xml:381: The following error occurred while executing this line:
[ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel
.Panel
[ERR] at org.apache.tools.ant
[ERR] .Target.performTasks(Target.java:413)
[ERR] C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel
.Panel
[ERR]
[ERR] Total time: 36 seconds
[ERR] The following error occurred while executing this line:
C:\Users\xxxxxxx\bin\Sencha\Cmd\6.5.0.180\plugins\ext\current\plugin.xml:156: com.sencha.exceptions.BasicException: The following error occurred while
executing this line:
C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\build-impl.xml:381: The following error occurred while executing this line:
C:\Users\xxxxxxx\bin\Sencha\admin\.sencha\app\init-impl.xml:372: com.sencha.exceptions.ExNotFound: Unknown definition for dependency : Ext.panel.Panel
[ERR]
[ERR] The package was last modified by an older version of Sencha Cmd (6.0.0.202).
[ERR] Running "sencha package upgrade" may resolve the error described above.
[ERR]
Hard fail. This also produced a ${ext.dir} dir within my \bin\Sencha folder. K let's try dropping the -ext flag.
sencha generate app -s C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1\templates\admin-dashboard Admin C:\Users\xxxxxxx\bin\Sencha\admin
Code:
Sencha Cmd v6.5.0.180
[ERR] Unable to locate 'framework.dir' property from sencha.cfg and no framework directory specified
[ERR] Please ensure this command was executed from a valid framework directory
[ERR] No Framework specified
Ookk maybe it wants me to be in the main directory.
cd C:\Users\xxxxxxx\bin\Sencha\ext-6.0.1
App builds, same XTemp and requires warning as above.
cd to \sites\
sencha app build
Successful, with same warnings.
sencha app watch
Waiting for changes... (with warnings)
IBnl7TN.jpg
So in addition to an hour of manipulation, wild gesticulations, and two cups of coffee, I would *still* need to modify js code within app.json to get a basic, default app to display properly? Alright, let's make the change to app.json. sencha app watch is currently running, just waiting for the chance...
What happens next, and happens frequently with sencha app watch, is what I can only describe as a mental breakdown / adolescent tired - the app goes into a downward spiral of constantly refreshing, detecting the same changes over and over for minutes (hours, in one case when i was particularly curious and was more interested in pruning my plants outside). Sencha mem climbs and climbs and climbs. Thank god this new laptop has 16gb ram, because my last laptop with 4gb quickly goes into oh sh*t mode and runs out of available ram.
elJd4nZ.png
Code:
INF] -----------------------
INF] Waiting for changes...
INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\packages\charts\src\chart\axis\Numeric3D.js
INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\theme-triton\package.json
INF] Loading Build Environment
INF] Loading compiler context
INF] -----------------------
INF] Application available at http://localhost:1841
INF] Application available at http://localhost:1841
INF] Loading app json manifest...
INF] Appending content to C:\Users\xxxxxxx\bin\Sencha\sites\bootstrap.js
INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\classic.json
INF] merging 254 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
INF] merging 80 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
INF] Copying shared resources to C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin...
INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.json
INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.js
INF] writing sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
INF] Running sass build.
INF] Fashion build starting for ..\..\build\temp\development\Admin\sass\Admin-all.scss
INF] Fashion build complete for ..\..\build\temp\development\Admin\sass\Admin-all.scss
INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
INF] Using base href : C:\Users\xxxxxxx\bin\Sencha\sites/build/development/Admin/classic/resources/
INF] Running sass build.
INF] Fashion build starting for ..\..\build\temp\development\Admin\sass\Admin-all.scss
INF] Fashion build complete for ..\..\build\temp\development\Admin\sass\Admin-all.scss
INF] Application available at http://localhost:1841
INF] Appending content to C:\Users\xxxxxxx\bin\Sencha\sites\bootstrap.js
INF] Writing content to C:\Users\E069113\bin\Sencha\sites\classic.json
INF] Refresh complete in 15 sec. at 12:40:48 PM
INF] -----------------------
INF] Waiting for changes...
INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\classic\src\picker\Month.js
INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\classic\src\selection\RowModel.js
INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\packages\charts\src\chart\axis\Numeric3D.js
INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\packages\charts\src\chart\series\sprite\Scatter.js
INF] Detected change to C:\Users\xxxxxxx\bin\Sencha\sites\ext\classic\theme-triton\package.json
INF] Loading Build Environment
INF] Loading compiler context
INF] -----------------------
INF] Application available at http://localhost:1841
INF] Application available at http://localhost:1841
INF] Loading app json manifest...
INF] Appending content to C:\Users\xxxxxxx\bin\Sencha\sites\bootstrap.js
INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\classic.json
INF] merging 254 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin\classic\resources
INF] merging 80 input resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
INF] merged 3 resources into C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin
INF] Copying shared resources to C:\Users\xxxxxxx\bin\Sencha\sites\build\development\Admin...
INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.json
INF] Writing content to C:\Users\xxxxxxx\bin\Sencha\sites\sass\example\bootstrap.js
INF] writing sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
INF] appending sass content to C:\Users\xxxxxxx\bin\Sencha\sites\build\temp\development\Admin\sass\Admin-all.scss.tmp
This is a very common occurrence, whereby I decide to use web start / refresh to keep updates going, unless I run into the unfortunate instance I need to update .scss and need watch to push those updates.
K lets kill sencha app watch, and restart it.
Waiting for changes...
It worked. By jove, I think we've done it.
Is that all really necessary? I have to be doing something wrong. Besides the constant app watch issues. Despite the cryptic cmd errors that require debug > output.txt reviews. Despite the ever-increasing ram usage while even default sites are running. I love ExtJs. But jesus, that is a long walk to get to a solution.