0

I'm currently using Sencha Architect 3.5 and ExtJS 6.0.X, and I am having trouble importing the Charts library/js file needed.

I have a panel with a ColumnChart/CartesianChart on it, I've also set the Store and column values in anticipation of the actual data that I'll be getting from my database.

However, after refreshing and loading my Web App, I got the following error:

GET http://localhost/MyApp/ext/classic/classic/src/chart/series/Bar.js net:: ERR_ABORTED 404 (Not Found)
GET http://localhost/MyApp/ext/classic/classic/src/chart/axis/Category.js net:: ERR_ABORTED 404 (Not Found)
GET http://localhost/MyApp/ext/classic/classic/src/chart/series/Numeric.js net:: ERR_ABORTED 404 (Not Found)
GET http://localhost/MyApp/ext/classic/classic/src/chart/CartesianChart.js net:: ERR_ABORTED 404 (Not Found)

Here's what I've done so far:

I've added in "ext-charts" to my app.json file in the project folder root, under the requires segment. However, did this not work as I'm working on ExtJS 6.0.X, not ExtJS5.

I've also tried adding in "sencha-charts", "charts", instead of "ext-charts", but to no avail, I still got the same error.

Of course just adding in those lines in the app.json file was insufficient, as this document from Sencha shows, I also had to run sencha app build on my project's root folder using terminal.

I opened a terminal window and then navigated to my project's root folder and executed sencha app build. However, I then encountered this error:

Sencha Cmd v6.1.2.15
[INF] Processing Build Descriptor : default
[WRN] Failed to resolve package theme-crisp64796bdf-bf6a-417b-b82d-1b8f7f35f246
[ERR] Cannot satisfy requirements for "core" !
[ERR]       The following versions cannot be satisfied:
[ERR]           classic: core (No matches!)
[ERR]           charts: core (No matches!)
[ERR] Cannot resolve package requirements

I also tried to do it without Sencha Cmd, by adding in:

<script type="text/javascript" src="ext/build/packages/charts/classic/charts.js"></script>
<link rel="stylesheet" type="text/css"  href="ext/build/packages/charts/classic/classic/resources/charts-all.css">

To my index.html file, making sure to uncheck "Overwrite index.html on save" in SenchaArchitect, while keeping the "charts" line in the "requires" part of app.json. However, that too did not help.

Not sure how I'm supposed to proceed from here.

Here are the versions of the important software:

  • Operating System: MacOS 10.13.6 (High Sierra)
  • SenchaArchitect Version: 3.5.1.348
  • SenchaArchitect Channel: 3.5-stable
  • SenchaArchitect Platform: 0.36.7
  • Sencha CMD: 6.1.2.15
  • Framework: ExtJS 6.0.X
  • Ruby and JRE are both installed and are detected by SenchaArchitect
Razgriz
  • 7,179
  • 17
  • 78
  • 150
  • Try to add `"requires": [ "charts"]` in app.json and `requires: ['Ext.chart.*']` in Application.js file (Ext.app.Application). Also you have a mistake in "clasic" - u missed 's' – Andrew Koshkin Dec 01 '21 at 15:15
  • Do you have `charts` folder under `ext/packages`? – Peter Koltai Dec 01 '21 at 16:30
  • @AndrewKoshkin I tried the configuration you mentioned but I'm still getting the error. Also, apologies for the "clasic", I'm using a different machine to compile than the one I'm using to post this question. – Razgriz Dec 02 '21 at 06:22
  • @PeterKoltai I have a `charts` folder under `ext/packages` – Razgriz Dec 02 '21 at 06:23
  • @PeterKoltai However, I just noticed that I don't have the `charts` folder under `ext/classic/classic/src`, do I just copy the charts folder over there as well? – Razgriz Dec 03 '21 at 01:19
  • @Razgriz I would not recommend manual copying because it won't be there when you upgrade ExtJS later. You have to figure out why does it look for the charts package at the wrong place. It is somehow related to your custom theme package I think. – Peter Koltai Dec 03 '21 at 07:55
  • @PeterKoltai what if there's no immediate plans of upgrading ExtJS? – Razgriz Dec 03 '21 at 08:15
  • @Razgriz You can give it a try but as far as I see not only `charts` can't be found in the package but also `classic`. For some reason (I don't have experience with Architect) the package `theme-crisp64796bdf-bf6a-417b-b82d-1b8f7f35f246` is looking for ExtJS parts in the wrong place. This is what should be fixed. – Peter Koltai Dec 03 '21 at 08:19
  • @Razgriz Check this, maybe it is a path problem: https://stackoverflow.com/questions/39611449/sencha-cannot-satisfy-requirements-for-ext – Peter Koltai Dec 03 '21 at 08:21
  • @PeterKoltai thank you, I'll give those resources a look. – Razgriz Dec 04 '21 at 01:48
  • @PeterKoltai I think something's wrong with my project, I'm missing several files, such as `workspace.json` in my project root, and I also don't have the `MyApp\.sencha\workspace` folder. – Razgriz Dec 04 '21 at 04:34
  • @Razgriz Try creating a new project and add charts package there. – Peter Koltai Dec 04 '21 at 08:10
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/239822/discussion-between-razgriz-and-peter-koltai). – Razgriz Dec 04 '21 at 08:15

0 Answers0