PDA

View Full Version : Tried to generate app GS > "Failed to determine framework name"



user2223091
22 Nov 2012, 7:33 PM
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
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
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

dongryphon
23 Nov 2012, 12:09 AM
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/#!/guide/command-section-4

user2223091
24 Nov 2012, 7:22 PM
It's work. Thanks for your message.

What I've done:


cd /Applications/Sencha/sencha-touch-2

And :


sencha generate app GS ../GS

Have a good day

bobg
7 Feb 2013, 1:03 PM
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.

dongryphon
7 Feb 2013, 2:38 PM
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.


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

StijnDeWitt
25 Oct 2013, 1:01 AM
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
(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
(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.

dongryphon
25 Oct 2013, 3:01 PM
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
(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:



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:



sencha generate app MyApp /path/to/MyApp


?



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
(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:



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. :)

StijnDeWitt
30 Oct 2013, 6:18 AM
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