ExtJS - Unable to locate supported Framework - extjs

Downloaded Ext JS Enterprise* Edition for MacOS Catalina. Unzipped the file and executed the SenchaCmd-7.2.0.66-osx.app which installed the CMD tool.
The instructions to generate the application documented here states the following:
Generate the application using the following command:
sencha -sdk /path/to/downloaded/sdk generate app modern MyApp ./MyApp
what is the /path/to/downloaded/sdk?
Tried several different paths but always get the following error:
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.
Please help!

could not get the zip download and CMD to work. Used the NPM option to download and make new app.

Related

Sencha CMD, upgrading from 6.0 to 6.1 IndexOutOfBoundsException

I'm trying to sencha app build with Sencha CMD 6.1.1.76 but I'm getting:
BUILD FAILED
[ERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97
[ERR] )
and not much else : /
this project was previously built using 6.0.0.92
but I don't see that specific one on sencha's cdn http://cdn.sencha.com/cmd/6.0.2.14/release-notes.html
I don't think I'm the only one with this issue: https://www.sencha.com/forum/showthread.php?309457-IndexOutOfBoundsException-when-running-sencha-app-build-testing&p=1131708#post1131708
Has anyone been able to overcome this issue ?
running sencha app upgrade is of no help, ExtJs 5.0 is using in this project.
Also I get a different exception but the same task originates it (slice-images within slice-impl.xml)
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR] at com.sench
[ERR] a.cli.Command.dispatch(Command.java:43)
[ERR]
[ERR] Total time: 30 seconds
[ERR] The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/build-impl.xml:335: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:370: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:371: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:240: com.sencha.exceptions.BasicException: Java heap space
I have tried increasing the heap size on some configuration files but no luck.
So this is the workaround I found in order to be able to:
a) generate the css file on the build process
b) run all the other tasks from the build process.
Ultimately I found that the line causing this issue was:
ext.dir=${workspace.dir}/ext
that was on
.sencha/workspace/sencha.cfg
After removing that line I was able to run sencha app build and generate the proper css file.
And the index and resources on the production folder looked good but I got some issues on the regular index ... wrong references etc so looks like I needed that configuration.
ext.dir=${workspace.dir}/ext
So to overcome this I just backed up my .css file and then set:
#comment out this line
#ext.dir=${workspace.dir}/ext
skip.slice=1
in .sencha/app/sencha.cfg
This is the only way I have found to:
1 build the project
2 update the .css with a different theme.
UPDATE
This is generating an 'extjs trial' water mark on the components so it is not useful ...
What I usually do in cases where I'm using an older version of the framework is install the corresponding Sencha Cmd version.
In this case the Sencha Cmd version 6.0.0.92 is probably a beta version as is seen in the release notes:
Release Notes for Sencha Cmd 6.0.0 Beta
Date: May 22, 2015
Version Number: 6.0.0.154
So this is probably going to be difficult.
Is it possible to run sencha app upgrade --noframework. I know it is a ExtJS 5 application, but this only updates the Sencha Cmd configuration files. You can merge your changes easily afterwards and with some luck it'll work with Sencha Cmd 6.1.x.
If this doesn't work, please run sencha -d app build. This will generate an enormous amount of information, but it might give some hints to the exact cause. You can use sencha -d app build >build.log to create a log file.
Good luck, Sencha Cmd problems can be difficult to debug.

So where is the sencha sdk anyways?

I have sencha installed on my system and my company has purchased a license and support (I wish they'd let me know how to access this support) but thankfully there are places like Stackover flow :)
I am trying to follow a simple tutorial (http://docs.sencha.com/extjs/5.1/getting_started/getting_started.html) and I cannot get past the first step which is to generate an app with sencha so I do this ...
[red#tools-dev1 ~]$ cd TutApp/
[red#tools-dev1 TutApp]$ pwd
/users/red/TutApp
[red#tools-dev1 TutApp]$ which sencha
/scratch/sencha/Sencha/Cmd/5.1.3.61/sencha
[red#tools-dev1 TutApp]$ sencha -sdk /scratch/sencha/Sencha generate app TutorialApp ./TutorialApp
Sencha Cmd v5.1.3.61
[ERR] Unable to locate supported Framework.
Please ensure this command was executed from a supported framework
directory or that a framework directory was specified via the -sdk switch.
For example:
sencha -sdk /path/to/framework-dir generate app AppName path/to/app
[ERR] com.sencha.exceptions.ExState: Not a framework directory : /scratch/sencha/Sencha
at com.sencha.cli.AbstractCommand$Property.set(AbstractCommand.java:406)
at com.sencha.cli.AbstractCommand.processConfigParam(AbstractCommand.java:527)
at com.sencha.cli.AbstractCommand.configure(AbstractCommand.java:114)
at com.sencha.command.Sencha.main(Sencha.java:129)
Caused by: Not a framework directory : /scratch/sencha/Sencha
at com.sencha.command.Sencha.setSdkPath(Sencha.java:388)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at com.sencha.cli.AbstractCommand$Property.set(AbstractCommand.java:394)
at com.sencha.cli.AbstractCommand.processConfigParam(AbstractCommand.java:527)
at com.sencha.cli.AbstractCommand.configure(AbstractCommand.java:114)
at com.sencha.command.Sencha.main(Sencha.java:129)
OK what do I use for /path/to/framework-dir???
Much like any other SDK or set of tools you might download from a company, "where" is completely dependent on the folder you chose to download and extract them to.
Your confusion may come from the fact that Sencha Cmd and the Sencha framework are different downloads -- and because Sencha Cmd is a binary program physically installed on your machine, whereas the SDK/framework is simply a folder containing static files.
When Sencha Cmd is installed, you can find it's location (on Unix/Linux) by typing which sencha into your terminal.
The SDK/framework is more tricky to find, again because it's just a regular folder containing static assets. Seasoned developers tend to stick all SDKs in the same place (so they don't have to wonder "WTF did I put that?") but not everyone does exactly the same thing.
In the Sencha ecosystem, I'm willing to bet most people don't install Sencha Cmd and the SDK/framework in the same place -- again because of the nature of binary-vs-static-assets.
Well it took me ages to work out what was meant by -sdk too. It isn't at all obvious because most of us amateur developers don't think of the Ext JS framework download as an sdk. This worked for me on windows (forgive me!), using wamp.
Open a dos box and navigate to the sencha cmd dir, in my case:
C:\Users\csheen\bin\Sencha\Cmd\6.0.2.14>
then typed the following command string:
sencha -sdk c:\wamp\www\ext-6.0.0 generate app MyApp c:\wamp\www\myapp
#arghurakay, #Ozgur, and #jsalisbury are absoluterly correct.
This is what I did:
Download and install sencha cmd
Make sure that the sencha cmd is in the Environment variable list after the installation
If you can't find the variable, manually add the variable to your list. (I had to do this)
Download the sdk as a zip file and unzip it to c:\Path\To\Framework
Run the command sencha -sdk c:\Path\To\Framework\ext-6.0.0 generate app MyApp c:\Path\To\myapp
cmd was throwing an error that framework folder is not valid and then I realized there are some spaces in my directory's name.

Sencha CMD Error "Did not locate framework package"

I'm new to Sencha and I just installed Sencha CMD. Following Sencha's instructions I type the following on the command line:
sencha generate app -ext MyApp ./app
But all I get is this error message:
C:\SenchaCMD\Sencha>sencha generate app -ext MyApp ./app
Sencha Cmd v5.0.1.231
[WRN] Did not locate framework package
[ERR] java.lang.NullPointerException
at com.sencha.util.PathUtil.normalizePathCharacters
...
...
at com.sencha.command.Sencha.main(Sencha.java:141)
I've searched the internet for the error message and haven't found anything.
Try below command to generate sencha app.
sencha -sdk F:/touch-2.3.0 generate app Test-app .(Dot represent current directory)
sdk is the path to your touch library.
Test-app is your app name.
I had the exact same problem.
I had installed Sencha Cmd in a non-standard folder (within C:\Program Files (x86)\). Uninstalling Sencha Cmd and reinstalling it in the default folder (C:\Users\<UserName>\bin\) made the error go away.
You need to run it with the ExtJS sdk path.
In my case, the just downloaded ExtJS sdk:
sencha -sdk "C:\Users\username\Downloads\ext-5.1.1-trial\ext-5.1.1" generate app -ext MyApp ./app
It also need administrators right if you installed it in the ProgramFile Folder.
Run your console with administator rights.
"Did not locate framework package"
You should run this command from inside of touch-2.3.1 folder.
[ERR] java.lang.NullPointerException
run java -version looks like you are missing java
...and as a linux user, the same error appears if you install sencha command via sudo. You shouldn't do that.
so just run
guy#idoru:~$ chmod +x SenchaCmd-<version>-linux-x64.run
guy#idoru:~$ ./SenchaCmd-<version>-linux-x64.run
instead of
guy#idoru:~$ sudo ./SenchaCmd-<version>-linux-x64.run

generate sencha touch application

i got this error after using sencha generate commande
C:\Users\usr\bin\Sencha\Cmd\3.1.2.342>sencha generate app senchapp "C:\Users\usr\Desktop\senchaapps"
error after creating senchaapps directory :
[INF] generate-workspace:
[INF]
[INF] -after-generate-workspace:
[ERR] Unable to locate 'framework.dir' property from sencha.cfg
[ERR] Please ensure this command was executed from a valid framework directory
[ERR] Non-framework directory
actually, the sencha command should be run from the framework directory (touch-x.x.x folder) rather than the cmd directory. With your terminal, go inside this framework folder and then run this command:
$ sencha generate app nameOfYourApp ../Path/or/your/app
hope this will work.
Maybe the problem could be that you not set the SDK path:
sencha -sdk ../bin/Sencha/touch-2.3.1/ generate app App .

Sencha native app error st-res/templates/stbuild_template_sim.app/ does not exists

I'm trying to build a native application from sencha cmd using sencha app build native and everything seems to work fine until it gets to this part:
failed running native packager
[ERR] Source directory: st-res/templates/stbuild_template_sim.app/ does not exists
Error copying st-res/templates/stbuild_template_sim.app/ to /home/dethstar/public_html/muhapp/build/muhapp/native/muhapp.app/
Failed to package application
But I Haven't been able to find anything about these files, neither online or in the touch directories. Any idea?
I had to link st-res and stbuild into my working directory:
ln -s /opt/Sencha/Cmd/4.0.0.203/stbuild/stbuild
ln -s /opt/Sencha/Cmd/4.0.0.203/stbuild/st-res
"/opt/Sencha/Cmd/4.0.0.203/" needs to be replaced with the path to your Sencha CMD installation.

Resources