sencha app build Error codegen.json not found
Asked Answered
C

5

6
C:\wamp\Sencha\Test>sencha app build testing
[ERR] Cannot find file: C:\Program Files\Sencha\Cmd\repo\.sencha\codegen.json
 at com.sencha.util.BasicFileSystemHelper.writeFileData(BasicFileSystemHelpe
r.java:49)
 at com.sencha.util.FileUtil.writeFileData(FileUtil.java:284)
 at com.sencha.util.FileUtil.writeFileData(FileUtil.java:266)
 at com.sencha.util.FileUtil.writeFile(FileUtil.java:246)
 at com.sencha.util.FileUtil.writeFile(FileUtil.java:238)
 at com.sencha.util.JsonUtil.saveJson(JsonUtil.java:145)
 at com.sencha.util.JsonUtil.saveJson(JsonUtil.java:149)
 at com.sencha.tools.generator.DataStoreImpl.save(DataStoreImpl.java:144)
 at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:125)
 at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:177)
 at com.sencha.command.environment.WorkspaceRepository.getLocalRepository(Wo
 rkspaceRepository.java:115)
 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)
 Caused by: C:\Program Files\Sencha\Cmd\repo\.sencha\codegen.json (The system
 cannot find the path specified)
 at java.io.FileOutputStream.open(Native Method)
 at java.io.FileOutputStream.<init>(Unknown Source)
 at com.sencha.util.BasicFileSystemHelper.writeFileData(BasicFileSystemHelpe
 r.java:41)
 at com.sencha.util.FileUtil.writeFileData(FileUtil.java:284)
 at com.sencha.util.FileUtil.writeFileData(FileUtil.java:266)
 at com.sencha.util.FileUtil.writeFile(FileUtil.java:246)
 at com.sencha.util.FileUtil.writeFile(FileUtil.java:238)
 at com.sencha.util.JsonUtil.saveJson(JsonUtil.java:145)
 at com.sencha.util.JsonUtil.saveJson(JsonUtil.java:149)
 at com.sencha.tools.generator.DataStoreImpl.save(DataStoreImpl.java:144)
 at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:125)
 at com.sencha.tools.pkg.LocalRepository.init(LocalRepository.java:177)
 at com.sencha.command.environment.WorkspaceRepository.getLocalRepository(Wo
 rkspaceRepository.java:115)
 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)

I got this error while i build testing of app,I used sencha cmd,and sencha version 2.2 Please reply with solution

is this environment variable problem, In my sencha cmd setup C:\Program Files\Sencha\Cmd\repo.sencha\codegen.json,repo folder is not created in my cmd setup folder,is this problem for this??

Callender answered 30/7, 2013 at 10:10 Comment(0)
C
9

That's because of permissions to write in that directory. Change your access permissions or install sencha cmd in another drive.

Cornerstone answered 30/7, 2013 at 11:21 Comment(1)
Thanks! I should not have installed it into C:\Program File in first place.Champaigne
C
4

Running the cmd as administrator solved the problem to me!

Clarisaclarise answered 5/5, 2014 at 7:35 Comment(0)
C
3

Under Windows 7, installing Sencha cmd doesn't create this "repo" directory when installed under the Program Files / Program Files (x86) directory. Due to the fact that Windows 7 won't give write access to this folder (and its subfolders), therefore the cmd won't be able to create anything there.

First, one must navigate to the install folder c:\Program Files\Sencha\Cmd, and must create a new folder "repo" there (one needs admin rights for that).

Second, one has to change the security settings of that "repo" folder, and has to allow "full access" to the Users group.

From now on, Sencha cmd works fine.

Corrinecorrinne answered 18/2, 2015 at 15:1 Comment(1)
This worked for me. However, I installed Sencha cmd in another location and still had to follow this procedure because of restrictive security policies applied via GPO settings.Conversion
U
1

I needed to configure the used directory in the sencha.cfg since it was set to a wrong default value:

repo.local.dir=/PATH/TO/DIR
Undying answered 24/8, 2020 at 11:55 Comment(0)
D
0

I think following command might solve this issue for Linux user as well as for Windows user those are using GitBash or try to interpret similar command in Powershell.

mkdir -p ~/.sencha/cmd
cat << EOF > $HOME/.sencha/cmd/sencha.cfg
#------------------------------------------------------------------------------
# The folder for the local package repository. By default, this folder is shared
# by all versions of Sencha Cmd. In other words, upgrading Sencha Cmd does not
# affect the local repository.

repo.local.dir=${HOME}/.sencha/cmd/repo

EOF

sencha diag show
Delaware answered 3/5, 2022 at 15:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.