Sencha CMD Error "Did not locate framework package" - extjs

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

Related

ExtJS - Unable to locate supported Framework

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.

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.

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 .

How to build production application using sencha cmdv3

Can anybody tell me how to build a production application using sencha cmdv3.
I have tried using
C:\Users\Test\bin\Sencha\Cmd\3.0.0.250>sencha create jsb -a D:\Test
VSSProject\app1\index.html -p Test.jsb3
And I'm getting no such property error.
I also tried:
C:\Users\Test\bin\Sencha\Cmd\3.0.0.250>sencha app build
And I get the error:
Please ensure this command was executed from a valid application
C:\Users\Test\bin\Sencha\Cmd\3.0.0.250>sencha -sdk D:\sencha-touch\
ext-4.1.1a app build production D:\Test
Thanks

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