1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    2
    Vote Rating
    1
    user2223091 is on a distinguished road

      0  

    Default Tried to generate app GS > "Failed to determine framework name"

    Tried to generate app GS > "Failed to determine framework name"


    Hello,

    I'm on Mac OS X Mountain Lion, I downloaded:
    - SenchaCmd-3.0.0.250-osx
    - SenchaSDKTools-2.0.0-beta3-osx
    - sencha-touch-2.1.0-gpl

    It's all installed in:
    Applications/Sencha/sencha-touch-2
    Applications/Sencha/SenchaCMD3
    Applications/Sencha/SenchaSDKTools

    When I try to generate my first app using
    Code:
    sencha generate app GS ../GS
    I've got the error:

    Failed to determine framework name. Please ensure this command was issued from either a framework or application directory

    But the command
    Code:
    sencha generate app
    seems to respond :

    Sencha Cmd v3.0.0.250 [ERR] sencha.generate.app requires these parameters: path (The path for the generated application)

    Do you have any idea where this error comes from?
    Thanks for your help,
    - Victor

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,403
    Vote Rating
    148
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    You do not need SDK Tools ... I would remove them as Sencha Cmd replaces them.

    Sounds like you are not running the command from the framework folder. For getting started, see these guides:

    http://docs.sencha.com/ext-js/4-1/#!/guide/command
    http://docs.sencha.com/ext-js/4-1/#!/guide/command_app

    This particular issue is covered here:

    http://docs.sencha.com/ext-js/4-1/#!...mand-section-4
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    2
    Vote Rating
    1
    user2223091 is on a distinguished road

      1  

    Default


    It's work. Thanks for your message.

    What I've done:

    Code:
    cd /Applications/Sencha/sencha-touch-2
    And :

    Code:
    sencha generate app GS ../GS
    Have a good day

  4. #4
    Ext JS Premium Member bobg's Avatar
    Join Date
    Feb 2008
    Location
    Boston
    Posts
    27
    Vote Rating
    1
    bobg is on a distinguished road

      0  

    Default


    Had same issue.

    You don't need the Sencha-Touch-SDK as the Sencha-CMD replaces it.

    Delete the SDK and install CMD as per the documentation.

    For the 'sencha' command use the -sdk flag to tell it where ext-js or sencha-touch lives.

    Like this:

    sencha -sdk /Applications/Sencha/sencha-touch-2 generate app GS ../GS

    Hope this helps someone else.

  5. #5
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,403
    Vote Rating
    148
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    To clarify the above comment - this "Touch SDK" piece should be "SDK Tools".

    You need Sencha Touch 2.1 (informally called "the SDK") and Sencha Cmd v3 to run the command posted.

    Quote Originally Posted by bobg View Post
    You don't need the Sencha-Touch-SDK Tools as the Sencha-CMD replaces it.
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  6. #6
    Sencha Premium Member
    Join Date
    Jan 2010
    Posts
    20
    Vote Rating
    1
    StijnDeWitt is on a distinguished road

      0  

    Default The docs should be clearer on this

    The docs should be clearer on this


    I am trying to follow the documentation for Sencha Cmd, but it is not very clear on this subject.

    In the section on generating an app
    http://docs.sencha.com/cmd/4.0.0/#!/guide/command_app_ext42
    it talks about 'SDKs':

    "Important: The above command must be able to determine the appropriate SDK."

    However, in the error message it talks about frameworks:
    "Failed to determine framework name"

    Also, there is a specific section about setting up a workspace, that talks about managing frameworks
    http://docs.sencha.com/cmd/4.0.0/#!/guide/command_workspace
    It says:

    "The location of Sencha Ext JS or Sencha Touch (i.e., the "SDK" or "framework") is stored as a configuration property of the workspace."

    (I guess here it is made clear that SDK and framework are equivalent..)
    It then goes on to explain how to set the framework location... This suggests to me that Sencha Cmd 'knows' from the config which framework I am using and since I have only one it seems weird that I have to add the -sdk flag anyway...

    I guess once you know how it works the docs do make sense... But at that point you don't really need them anymore. Maybe you should start the docs by explaining the relationships between Framework/SDK, workspace and application.

    Also this part of the error message is super confusing:

    [ERR] Failed to determine framework name. Please ensure this command was issued from either a framework or application directory

    It doesn't make any sense in my mind to run a generate app command from the application directory. I understand this message is probably generic. What I am saying is that it's probably worth it to make the first steps of setting up a new workspace and new app so obvious and dummy proof even people like me get it right away. Because it will be the first thing most people will be doing with Sencha Cmd, getting confusing error messages right away is a real turn down.

  7. #7
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,403
    Vote Rating
    148
    dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold dongryphon is a splendid one to behold

      0  

    Default


    Quote Originally Posted by StijnDeWitt View Post
    I am trying to follow the documentation for Sencha Cmd, but it is not very clear on this subject.

    In the section on generating an app
    http://docs.sencha.com/cmd/4.0.0/#!/guide/command_app_ext42
    it talks about 'SDKs':

    "Important: The above command must be able to determine the appropriate SDK."

    However, in the error message it talks about frameworks:
    "Failed to determine framework name"
    Point taken on the inconsistency of "framework" and "SDK" as word to describe Ext JS and Sencha Touch. I will see if I can make this more consistent on the next revision of the guides. Thanks for taking the time to provide feedback on your experience!

    To help you with the error you are getting I will need to know the exact command you executed and the current directory when you executed it. There is a bug template link in my signature that will help.

    In the guide you mention, I assume you entered something like this:

    Code:
    sencha -sdk /path/to/SDK generate app MyApp /path/to/MyApp
    Where you replaced "/path/to/SDK" with the path to the downloaded Ext JS or Sencha Touch. Either that or you did a "cd" over to that path and ran this command:

    Code:
    sencha generate app MyApp /path/to/MyApp
    ?

    Quote Originally Posted by StijnDeWitt View Post
    Also, there is a specific section about setting up a workspace, that talks about managing frameworks
    http://docs.sencha.com/cmd/4.0.0/#!/guide/command_workspace
    It says:

    "The location of Sencha Ext JS or Sencha Touch (i.e., the "SDK" or "framework") is stored as a configuration property of the workspace."

    (I guess here it is made clear that SDK and framework are equivalent..)
    It then goes on to explain how to set the framework location... This suggests to me that Sencha Cmd 'knows' from the config which framework I am using and since I have only one it seems weird that I have to add the -sdk flag anyway...
    These instructions only apply once you have a workspace created. You can generate an empty workspace almost anywhere:

    Code:
    sencha generate workspace .
    But you will get a workspace for free when you generate an app if you are generating an app in to a folder that is not part of a workspace already.

    Before any of these things exist, Cmd still needs to know the framework/SDK you want for an app - so current directory or "-sdk" switch provide that.

    Even when you are in a workspace alone, there is no way to know *which* SDK you are wanting: Ext JS or Touch. In an app that is different of course since the app has to target one SDK. This comes in to play if you generate a workspace and place apps below there in the file system.

    But for starters it would be best to focus on the initial failure to received at Step #1.
    Don Griffin
    Engineering Manager - Frameworks (Ext JS / Sencha Touch)

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  8. #8
    Sencha Premium Member
    Join Date
    Jan 2010
    Posts
    20
    Vote Rating
    1
    StijnDeWitt is on a distinguished road

      0  

    Default


    Wow thanks for your detailed response!

    I initially found this thread because I was searching for the error message, trying to figure out what info was missing. Then I kinda put two and two together and figured out that I had to add the -sdk flag (or change dir to the ext folder) and that indeed fixed it. So I decided to just type up my experience as feedback for you guys.

    About the naming consistency... That is sooo hard to get right! I know all about it, our software also has these small inconsistencies all over the place.

    Probably the best thing is to just explicitly mention that framework and SDK are equivalent somewhere at the start of the docs for Sencha Cmd. The section that currently mentions this is a bit 'hidden' in the back

    Thanks again for your reply!

    Cheers,

    -Stijn