PDA

View Full Version : Sencha cmd command not working in app directory



alnoorpdn
29 Aug 2013, 1:44 AM
Hi, I am using sencha-touch-2.2.1-commercial. My cmd version is 3.1.2.342. I am working on Windows 7 and have updated versions of Java and Ruby

I can successfully create new app by this command:
sencha generate app test ../test

In the app directory, this file structure is generated automatically:

.sencha (dir)
app (dir)
packages (dir)
resources (dir)
touch (dir)
app.js
app.json
build.xml
index.html
packager.json

Now, when I try to run sencha command in the app directory. I get the following error:

C:\wamp\www\sencha_server\sencha-touch-2.2.1-commercial\test>sencha
[ERR] null
at com.sencha.tools.pkg.HttpRepository.fixUrl(HttpRepository.java:136)
at com.sencha.tools.pkg.HttpRepository.<init>(HttpRepository.java:31)
at com.sencha.tools.pkg.RemoteRepository$Type$1.create(RemoteRepository.jav
a:33)
at com.sencha.tools.pkg.RemoteRepository.<init>(RemoteRepository.java:74)
at com.sencha.tools.pkg.RemoteRepository.<init>(RemoteRepository.java:102)
at com.sencha.tools.pkg.RemoteRepository.<init>(RemoteRepository.java:106)
at com.sencha.tools.pkg.RepositoryRemoteManagerImpl$1.accept(RepositoryRemo
teManagerImpl.java:28)
at java.io.File.listFiles(Unknown Source)
at com.sencha.tools.pkg.RepositoryRemoteManagerImpl.<init>(RepositoryRemote
ManagerImpl.java:26)
at com.sencha.tools.pkg.LocalRepository.<init>(LocalRepository.java:85)
at com.sencha.command.environment.WorkspaceRepository.getLocalRepository(Wo
rkspaceRepository.java:113)
at com.sencha.command.environment.WorkspaceRepository.getCatalog(WorkspaceR
epository.java:92)
at com.sencha.command.environment.WorkspaceEnvironment.resolvePackageModels
(WorkspaceEnvironment.java:103)
at com.sencha.command.environment.WorkspaceEnvironment.resolvePackageEnviro
nments(WorkspaceEnvironment.java:90)
at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackag
eEnvironments(AppOrPackageEnvironment.java:165)
at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackag
esNoThemes(AppOrPackageEnvironment.java:212)
at com.sencha.command.environment.AppOrPackageEnvironment.getRequiredPackag
eNamesNoThemes(AppOrPackageEnvironment.java:203)
at com.sencha.command.environment.AppEnvironment.<init>(AppEnvironment.java
:66)
at com.sencha.command.environment.BuildEnvironment.load(BuildEnvironment.ja
va:193)
at com.sencha.command.Sencha.loadBuildEnvironment(Sencha.java:374)
at com.sencha.command.Sencha.main(Sencha.java:127)




Note: in other locations, I can get successful response if I run "sencha" command.

Thank you.

alnoorpdn
29 Aug 2013, 1:04 PM
I could have done what I wanted anyway.

I have a packager file, and I was trying to build my app for Android by this command:
sencha app package build packager.json


But I got the error mentioned earlier. Now I have successfully built my app from outside the app directory like this:

sencha app package build path/to/my/app/packager.json

My app runs as I expected on my Android devices. I still cannot understand, why sencha is not recognised inside the app directory.

fmoseley
30 Aug 2013, 1:58 PM
Try deleting the local repo for Cmd. It should be located at: ~/bin/Sencha/Cmd/repo
The next time you do a build it will rebuild it.