This is one of those nasty and not well documented bugs/features of Sencha products. Bug or feature depends upon the person. I consider it a bug, though even the statement it is a bug would go a long ways in going away if Sencha CMD documentation were to become more clear. But we all need to take a deep breath on the documentation, they are NOT tutorials, they are API documentation. Huge difference between the two. So this is a tutorial on how to fix this issue.
sencha -sdk C:\Users\Andy Allord\Documents\Development\ext-6.2.0 generate app ToDo E:\todo\public
Sencha Cmd v6.5.3.6
[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 : C:\Users\Andy
[ERR] A log is available in the file "E:\todo\public\sencha-error-20180522.log"
Now the error is [ERR] Unable to locate supported Framework.
Contents of sencha-error-2018-05-22.log
Sencha Cmd 6.5.3.6 - Crash report
================================================
An error occurred while executing the following command: -sdk c:/Users/Andy Allord/Documents/Development/ext-6.2.0 generate app ToDo e:/todo/public
Diagnostic information:
=======================
cmd.config.dir : C:\Users\Andy Allord\bin\Sencha\Cmd\6.5.3.6
cmd.dir : C:\Users\Andy Allord\bin\Sencha\Cmd\6.5.3.6
cmd.merge.tool.args.araxis : -wait -merge -3 -a1 {base} {user} {generated} {out}
cmd.merge.tool.args.kdiff3 : {base} {user} {generated} -o {out}
cmd.merge.tool.args.p4merge : {base} {user} {generated} {out}
cmd.merge.tool.args.smartsync : {user} {generated} {base}
cmd.merge.tool.args.sourcegear : --merge --result={out} {user} {base} {generated}
cmd.merge.tool.args.tortoise : -base:{base} -theirs:{generated} -mine:{user} -merged:{out}
cmd.minver : 3.0.0.0
cmd.platform : windows
cmd.unicode.escapes : C:\Users\Andy Allord\bin\Sencha\Cmd\6.5.3.6/unicode-escapes.json
cmd.version : 6.5.3.6
cmd.web.port : 1841
inspector.address : http://localhost:1839/
repo.local.dir : C:\Users\Andy Allord\bin\Sencha\Cmd\repo
shared.sencha.dir : false
system.java.net.useSystemProxies : true
Exception information:
=======================
com.sencha.exceptions.ExState: Not a framework directory : c:/Users/Andy
at com.sencha.cli.AbstractCommand$Property.set(AbstractCommand.java:408)
at com.sencha.cli.AbstractCommand.processConfigParam(AbstractCommand.java:530)
at com.sencha.cli.AbstractCommand.configure(AbstractCommand.java:114)
at com.sencha.command.Sencha.main(Sencha.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:101)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:26)
Caused by: Not a framework directory : c:/Users/Andy
at com.sencha.command.Sencha.setSdkPath(Sencha.java:434)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sencha.cli.AbstractCommand$Property.set(AbstractCommand.java:396)
at com.sencha.cli.AbstractCommand.processConfigParam(AbstractCommand.java:530)
at com.sencha.cli.AbstractCommand.configure(AbstractCommand.java:114)
at com.sencha.command.Sencha.main(Sencha.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:101)
at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:26)
Informative for deep tracking into the problem. Now according to the documentation:
sencha -sdk /path/to/ext6 generate app MyApp /path/to/my-app
That is the command description how to create your project. Notice the nice clean line, simple, straight forward and to the point. The problem is a path with “spaces” in the name such as sencha -sdk C:\Users\Andy Allord\Documents\Development\ext-6.2.0 generate app ToDo E:\todo\public. Notice the space in the name. This is what throws the error causing the log file shown above.
The solution to this problem is simple but not well documented; when using the above statement the correct way to generate your app is
sencha -sdk “C:\Users\Andy Allord\Documents\Development\ext-6.2.0” generate app ToDo “E:\todo\public”
Now, I would suggest simply getting into the habit of quoting your paths and then you can prevent this problem from ever occurring. This also demonstrates the difference between API documentation and tutorials in showing how things should work.