I’m trying to generate a new app using the following:
root@li184-76:/var/www/touch-2.3.1# sencha generate app NewApp ../newapp
However, I get the following:
Sencha Cmd v4.0.1.4 [INF] Workspace does not have framework touch at /var/www ... copying [ERR] java.lang.NullPointerException at com.sencha.util.Version.<init>(Version.java:36) at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.getParameters(GeneratorCommands.java:130) at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:23) at com.sencha.command.generator.GeneratorCommands$WorkspaceCommand.execute(GeneratorCommands.java:89) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:622) at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:175) at com.sencha.cli.Command.dispatch(Command.java:42) at com.sencha.cli.Commands.dispatch(Commands.java:64) at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:124) at com.sencha.command.generator.GeneratorCommands$AppCommand.generateWorkspace(GeneratorCommands.java:397) at com.sencha.command.generator.GeneratorCommands$AppCommand.execute(GeneratorCommands.java:240) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:622) at com.sencha.util.MethodInvoker$Arguments.invoke(MethodInvoker.java:175) at com.sencha.cli.Command.dispatch(Command.java:42) at com.sencha.cli.Commands.dispatch(Commands.java:64) at com.sencha.cli.Commands.dispatch(Commands.java:64) at com.sencha.command.Sencha.dispatch(Sencha.java:80) at com.sencha.command.Sencha.main(Sencha.java:148)
The confusing thing is I already have previously generated apps. I don’t know why my attempts to create new ones are failing.
NOTE:
I tried upgrading Sencha but it does seems to have the desire effect as the following shows:
root@li184-76:/var/www/touch-2.3.1# sencha upgrade Sencha Cmd v4.0.1.45 [INF] Determining the latest version of Sencha Cmd [INF] The latest version of Sencha Cmd is 4.0.2.67 [INF] Sencha Cmd 4.0.2.67 is already installed
UPDATE:
I attempted to generate the app from outside the TOUCH folder but I get a weird error about SampleApp already existing. I have nothing called SampleApp in the target directory. The data is as follows:
root@li184-76:/var/www# sencha -sdk /var/www/touch-2.3.1/ generate app MyApp /var/www/myapp Sencha Cmd v4.0.1.45 [ERR] Path /var/www/myapp is already a configured application named : SampleApp [ERR] Path /var/www/myapp is already configured for application SampleApp root@li184-76:/var/www#
Advertisement
Answer
With thanks to arthurakay and Anand Gupta for your input and attempts to help, I eventually figured out the problem.
What had happened was at some point I corrupted my /var/www directory by attempting to generate a sencha app in the same, i:e /var/www, directory. That was the mistake that was causing all the havoc.
Luckily, I happened to list all the hidden files and found a .sencha folder which is why it kept complaining about SampleApp as described in the update section of my question.
Once I removed the .sencha folder and other related data, things moved beyond this to other challenges.
Thanks again for all your input.