Generate a sencha touch app

17,590

Solution 1

I had the same problem and finally figured that Sencha Touch 2.1 is not longer using Sencha SDK Tools but using Sencha Command instead.

You can find more here :

http://docs.sencha.com/touch/2-1/#/guide/command

and here

http://docs.sencha.com/touch/2-1/#!/guide/command_app-section-2

Hope this helped

Solution 2

Try this...

Make sure three things..

  1. Sencha touch installed path.
  2. Application generating keyword
  3. Where you going to save your Sencha touch project.

Lets create a project.

  • Open a command prompt
  • Type your Sencha touch sdk installed path. (For me: C:\inetpub\wwwroot\touch-2.3.1)
  • And type sencha generate app MyApp. here MyApp is our project name.
  • Then type the path where you going to save your project MyApp(For me: C:\inetpub\wwwroot\Poonguti\MyApp ).
  • press Enter.
  • Now, I hope you create a Sencha touch project.

here is an attached screen shot.screen shot

Solution 3

This is because, you are using the older version of SenchaCMD. This can happen because of two reasons.

Reason 1

You installed SenchaCmd first and SenchaSDK second. This may override the latest version of SenchaCmd with older version, which is shipped with SenchaSDK.

Solution

Install SenchaSDK first and SenchaCmd last.

Reason 2

The path of SenchaCmd set on environment variable may be wrong. Please check this.

As TDeBailleul said, you don't need SenchaSDK for the latest version of SenchaTouch. Just use SenchaCmd only.

Solution 4

I had the same issue. Finally, the problem was that I was using an old version of the sdk...

I would recenment to un installed version 2.0 and download and installed version 3.0.

Download Link

Solution 5

Install

sencha cmd
ruby
compasss
and Download sencha touch
extarct sencha touch

and then type

sencha -sdk PATH TO TOUCH folder generate app APPNAME PROJECTPATH

Share:
17,590
rashmi
Author by

rashmi

Updated on July 12, 2022

Comments

  • rashmi
    rashmi almost 2 years

    I am trying to create a new sencha touch app using "sencha generate app MyApp ../MyApp" command on Windows.

    I have done the following :

    Downloaded the latest sencha SDK and extracted it in folder "D:\MyProjects\sencha-touch-2.1.0-gpl" folder.

    Installed the sencha SDK tools in "D:\MyProjects\SenchaSDKTools-2.0.0-beta3" folder.

    Ensured that the system environment variable "SENCHA_SDK_TOOLS_2_0_0_BETA3" is indeed pointing to "D:\MyProjects\SenchaSDKTools-2.0.0-beta3"

    As per the sencha documentation I am supposed to run the sencha command in the sencha SDK or application folder.

    So if I cd to folder "D:\MyProjects\sencha-touch-2.1.0-gpl" and run "sencha generate app MyApp ../MyApp", I get this warning message

    **"[WARN] The current working directory (D:\MyProjects\sencha-touch-2.1.0-gpl) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode."**
    

    Why does not sencha recognize this as the SDK folder?

    Looking at the code in "sencha.js" file included as part of the sdk tools, it seems that sencha is looking for a ".senchasdk" file.

    So I tried the same command from one of the subfolders in the examples folder (since this folder contains a .senchasdk file)

    Now I end up with an error

    "node.js:201
            throw e; // process.nextTick error, or 'error' event on first tick
                  ^
    Error: Cannot find module 'D:\MyProjects\sencha-touch-2.1.0-gpl\command\sencha.js'
        at Function._resolveFilename (module.js:332:11)
        at Function._load (module.js:279:25)
        at Array.0 (module.js:479:10)
        at EventEmitter._tickCallback (node.js:192:40)"
    

    Since it seemed as if sencha was looking for a non existing folder called "command", I copied the contents of SDK tools folder to a new folder called "command" placed it under D:\MyProjects\sencha-touch-2.1.0-gpl\ folder.

    Executing the sencha generate command, results in an infinite loop and a lot of Node.exe processes are spawned (observed via TaskManager).

    Any help would be greatly appreciated.