7

I created a theme using the sencha cmd on a dummy app and now I want to use that theme on other applicattion. I've copied the theme folder to my app's packages folder and it's working fine.

I made some changes so I tried to use "sencha package build" to compile the theme and got this error:

[ERR] null
at com.sencha.command.environment.PackageEnvironment.loadBaseConfigs(PackageEnvironment.java:64)
at com.sencha.command.environment.PackageEnvironment.<init>(PackageEnvironment.java:46)
at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.java:166)
at com.sencha.command.Sencha.loadBuildEnvironment(Sencha.java:361)
at com.sencha.command.Sencha.<init>(Sencha.java:67)
at com.sencha.command.Sencha.<init>(Sencha.java:61)
at com.sencha.command.Sencha.main(Sencha.java:106

I thought the error was related to the theme but I also get this if I try to execute a sencha command from my app folder:

[ERR] Command must be run from an application folder

Obviously it's some kind of misconfiguration but I have no idea how to solve it. Any suggestions?

Edit: I've generated a new app with sencha cmd and copied the code from the old app to the new one. Now it's not building:

BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: com.sencha.exceptions.ExParse: Failed parsing path/ext-all-rtl-sandbox-debug-w-comments.js
[ERR]   at
[ERR]  org.mozilla.javascript.ast.FunctionNode.visit(FunctionNode.java:421)

Is there a way to compile the theme without using the cmd on ExtJs 4.2?

nahl
  • 237
  • 1
  • 3
  • 10
  • Are you running the command from your application's folder? – cclerv Apr 25 '13 at 20:44
  • Yes. The thing is someone else created this app. I know he used sencha cmd to generate it but maybe some files are missing. Is there a main config file or something that I should check? – nahl Apr 25 '13 at 21:13

2 Answers2

5

Actually, the issue with this error is that when you unzip the library, make sure you don't play around with the directory structure and/or content.

Basically in the sencha.cfg file, you will find the following entries

app.framework.version=4.2.1.883 app.cmd.version=3.1.2.342

Initially, my extjs library was under extjs421, which was the root of the library as I hate to have a directory within a directory and no other content.

I was able to generate the app, but, couldn't do a build.

So, I took my zip file and unzipped it, but left it intact, no renaming and/or content shuffling.

sencha --sdk ext-4.2.1-ent/ext-4.2.1.883 generate app Blah myBlah I modified the sencha.cfg file to have the neptune theme I did sencha app build

worked like a charm, no errors

Cheers!

cg_coder
  • 136
  • 1
  • 3
1

The structure of these applications is the same? Ext versions? Look at sehcha.cfg file (yourAppFolder/.sencha/app/sencha.cfg). Changes may be needed.

Vlad
  • 3,626
  • 16
  • 14
  • Ok, this is it. I don't have a .sencha folder in the app. Is there any way to generate it without losing anything? – nahl Apr 26 '13 at 09:41
  • A valid application directory is one that was generated by Sencha Cmd. I think you can try generate new app in another directory, and paste code from old app. – Vlad Apr 26 '13 at 09:53
  • Thank you. Lets see how it goes. – nahl Apr 26 '13 at 10:02
  • It didn't worked. I generated an app, builded it and it was working fine but as soon as I pasted the code from the old app the app build command stopped working. I've edited my first post with new error. – nahl Apr 26 '13 at 16:11