Cannot build package: Ext. dependency not found

Hi,

I'm trying to squeeze my existing ExtJS 4 project into the new workspace/application/package structure. There's two mostly independent pages with some shared code and CSS between them.

I created a new workspace, the two applications and a package for the shared code using the appropriate build commands. I then copied my application code to the applications' code directories and the shared code to the package's src directory, modified the app.json files to add the dependencies and built the applications.

While the resulting build outputs are fine, the application does not load in "Dev mode", i.e. working from the source directories, since the generated bootstrap.js does not include any classpath mappings to the package. In a way, this is unsurprising, since the docs state that I need to run

Code:

sencha package build

This produces a "build" folder inside the package. This is needed by applications when they are running in "dev mode" (without being compiled).

but a) that does not work (see later) and b) I'm confused how this works conceptually - I don't think building the package would give me a new bootstrap.js in the applications using the package? Would I have to rebuild the applications afterwards, even though I intend to continue using them in dev mode? How do changes then work, when do I have to re-run the package build / app build after package changes?

Regarding the problems with package build, my package (generated using sencha cmd packge -type code packagename) fails to build with a missing dependency that should obviously come from ExtJS -

After some more investigation, I still haven't figured out how to build my package, but as I already suspected, the suggestion that I need to build it in order to use my applications in dev mode does not seem to be entirely accurate. The part I was missing was that I needed to run sencha app refresh --packages on my applications, and that probably needs to happen every time I add a new class to the package since the resulting bootstrap file seems to add classpath mappings for every single class to the bootstrap.js.

I'd still be interested in the concepts behind packages and framework classes - it looks like packages aren't actually tied to an SDK version explicitly? If you're successfully using packages for sharing ExtJS code, can you explain to me how you do it?

Workaround Failed

Nevermind the workaround didn't work. I can successfully build the package, but I cannot consume the package from an "app". The ext src gets put in the source path twice which causes the "sencha app build" to fail.

Nevermind the workaround didn't work. I can successfully build the package, but I cannot consume the package from an "app". The ext src gets put in the source path twice which causes the "sencha app build" to fail.

I ran into the same problem, so I went crawling through the build-impl.xml file. I've found that when I run into Cmd issues, that's where I'll find my answers.

Anyway, I was able to fix this issue by adding the following to my .sencha/package/sencha.cfg file:

PHP Code:

package.framework=ext

If you're building a package for touch, of course you should change that value. Once I added that, I could build both my package and my app without any issues.

Any ideas why this would not work for me? I generated a code package....created a single class extending Ext.button.Button. Added 'package.framework=ext' to my ./package/sencha.cfg file but when I build it, it fails.....still cannot resolve Ext.