how to create an Extjs app using sencha cmd - extjs

I am new to sencha. I need to work on ExtJS and would like to create an app using sencha cmd. I have tried many things but not getting a clear info to create an app with sencha cmd.
Please help me by treating as a beginner to build an application.
Also after the installation of sencha cmd how can we start this to run sencha commands? When I try any command in normal terminal it shows me 'sencha is not recognized' in windows PC. Also I've given the sencha cmd path in the environment variable PATH.

After you fix the PATH problem and when sencha works, run
sencha generate app YourNameSpace /where/you/want/it
Run this command in ext directory - where you unzipped Ext.
For more details see http://extjs.eu/videos

Along with Path variable try to create another variable
SENCHA_CMD_5_0_0 and set the location of your sencha cmd
after doing this sencha cmd path will present in both path and sencha_cmd_5_0_0 variables

Sencha cmd is a Java Application, be sure you have Java SDK or JRE installed, also add the path to Sencha Cmd executable to your PATH environment variable, (My PC properties/Advanced/Environment VAriables), read the install documentation carefully.
Download Sencha SDK GPL or try the commercial version.
You could start generating a basic app or using a predefined template:
$ sencha -sd path/to/ext-6.x generate app APP_NAME path/to/project
A good starting point for more advanced applications is using the package templates, i.e the Admin Dashboard:
$ sencha -sd /path/to/ext-6x generate app -s /path/to/ext6.x/templates/admin-dashboard/ APP_NAME /path/to/project
You should run $ sencha package upgrade if required.

Related

Unable to use sencha command to generate project ExtJs 5.1

I am using extjs 5.1. As suggested here I have downloaded and installed sencha cmd 5
After issuing following command from terminal sencha generate app -ext MyApp ./app I am getting errors as shown in below image. Please help
I installed the sencha exe #C:\Program Files\Sencha\Sencha\Cmd\5.1.2.52 on my box.
-sdk flag should point to folder of the ExtJS framework, not to Cmd folder.
You have to download framework first or use remote version of the framework sencha generate app -ext MyApp ./app

Sencha Cmd ERR Invalid Path (Trial Version)

When I try to generate an ExtJS app with my trial installation it fails. It worked in the beginning. Here is what I get:
sencha generate app -ext sampleName F:\vs13\sampleName
Sencha Cmd v5.1.0.26
[INF] Loading framework from F:/../../../../../ext
[ERR] Invalid Path : F:\..\..\..\..\..\ext
Since it is a trial version it should automatically download the framework.
This will automatically download the Ext JS Commercial Trial package and use it to generate your application.
According to the documentation this is the syntax:
sencha generate app -ext MyApp /path/to/MyApp
Also I checked the path variable which includes the path to the Sencha Cmd installation:
PATH=F:\ExtJs\bin\Sencha\Cmd\5.1.0.26;
I tried to restart the development machine. It did not help.
Any suggestion to solve the error "Invalid Path"?
Did you move Sencha Cmd installation? That could be the reason because Ext library is downloaded only for the first application you create and it is cached in the Cmd installation tree. Next applications you create use this cached Ext. If you moved Cmd then it cannot find path to the cached Ext.
You can also try to uninstall Sencha Cmd and install it again.

Unable to locate framework.dir in sencha

I have installed sencha cmd 4.0.4.84. But when i tried to create an App it is showing Unalble to locate framework.dir property from sencha config.Ensure the command was executed from a valid framework direcotry.Non framework directory
It is exactly what it says: you are most likely running sencha from a wrong directory.
cd /where/you/extracted/ext-4.2.1
sencha generate app MyApp /where/you/want/myapp
For more details watch: Creating Workspace and Applications video.
I made a big mistake- i was running from sencha command root. But it has to be running from
Extjs version root. we have to create a worklocation inside it. their will extjs folder and from their we need run the command to create the App. Now it is working perfectly
You'll want to take a look at the cmd tools and workspaces.
A little more specifically take a look at the framework locations section of the page.
It's better to go to the SDK folder just mention the SDK path in your command while generating the app:
sencha -sdk <YOUR SDK PATH> generate app <APP NAME> <PATH TO GENERATE APP>
Before creating any sencha app.
Understand 2 things.
1. Sencha CMD
2.Extjs framework.
Both are different.
Coming to point:.
1. Download the latest extjs framework.
2.Use the below command
sencha -sdk=path/to/ext generate app MyAPP path/to/worspace/of/MyApp
This will solve the above issue asked in question.
Danke,
Rahul

Sencha cmd not opening

Hi I want to learn Sencha. I have basic knowledge of MVC. I have downloaded sencha Touch and Sencha cmd. I have extracted sencha Touch folder to my local. And I have installed Sencha cmd. But Sencha cmd is not working. When I click on cmd it automatically disappeared. What can I do now. I have installed Sencha SDK Tool.
Any one please help me out.
There is a series of videos on how to prepare your computer for development here: http://extjs.eu/videos
After installing Sencha cmd in windows you need to set Environment variables.
Open start menu
Click on computer > Right click Properties.
In properties > click on Advance setting.
In Advance setting click on environment variable.
Here you select path and click on edit and add the path of the sench cmd.
Go back to cmd and run sencha.
Here you will get all the sencha details. if you get means sencha is installed properly.
At first you have to download the cmd(Which you have done). Then do the followings:
It is a zip file. Extract it.
Then you will get a .run file(If using ubuntu) or .exe file(In Windows).
Double click this file and install it. (For Ubuntu, first you have to change permission of this file to 777 using chmod 777 .run/file/path and then double click).
Now you can run sencha in terminal and check whether it has successfully been installed or not.
Goto command promt and type sencha . if your sencha cmd is installed properly ,you will see data on your promt. if it says that sencha command not found,try reinstalling sencha cmd
there is no need to open sencha cmd and sdk if you have correctly installed sencha cmd then go to command promt and type sencha if it's show version and other help command then it's properly installed.
then go to your sdk path and create app by sencha generate app app_name folder_name or path where you want to create your application.
A real case: Sencha v6.5.3.6 on Windows 10 professional x64. From CMD, you run
C:\Users\computer_user_name\bin\Sencha\Cmd\sencha
I must point out full path of sencha.exe for running.

Sencha Touch CMD installation issues

I have a MAMP server running on the Mac.
in the directory path: /Applications/MAMP/htdocs/MyApp/sencha-touch-2.2.0-gpl/ my SDK is copied.
I downloaded the latest Sencha CMD tool from the sencha touch website: http://www.sencha.com/products/sencha-cmd/download for Mac version 3.1.1 for Mac
On installing the Sencha CMD tools: I chose Administrator/bin/ folder to install it into. It got installed successfully.
After that, I opened the Terminal window of the Mac, navigated to the SDK folder and typed the sencha command. I got the following issues:
The Sencha CMD is not reflecting the correct version.
Also, the same warning error pops up when I try to create a new Sencha App.
Could anyone please guide the correct method of installing Sencha CMD or is there any thing I have missed out?
Thanks,
Ankit Tanna.
For me it's all in ~/.bash_profile.
Open it with a text editor. Then you should remove the path to the SDK tools and add the path to the Sencha CMD if it's not there yet.
For example, in my ~/.bash_profile, I have
# export PATH=/Users/titouanvanbelle/bin/Sencha/Cmd/3.0.2.288:$PATH
export PATH=/Users/titouanvanbelle/bin/Sencha/Cmd/3.1.1.274:$PATH
I commented the path to an older version instead of removing it in case I need it again.
Hope this helps
I have the same problem with the bash
I do that you said but the only way that I can activate sencha is create an alias
sencha=/Users/AppDev/bin/Sencha/Cmd/3.1.2.342/sencha

Resources