View Full Version : [CLOSED] Failed to find file for my Viewport

1 Nov 2012, 11:46 AM
Hi, I'm pretty green with Sencha so please bear with me.

I'm trying to compile a project that I'm helping my boss with and I'm running into an odd error. I'm using the command:

sencha compile -classpath=ext/src,js page -yui -in app.html -out build/app.html

Everything runs fine and then I get the error:

Failed to find file for MyProject.view.Viewport
required by /Volumes/Secure/MyProject/BetaDevelopment_Web/Web/webroot/app/app.js

I've looked through the project (which loads fine in my browser) and the file exists, it's labeled correctly throughout the project files.

Is there a part of my terminal command's syntax that I should change?

Let me know if I need to provide more information. I don't know exactly where to start troubleshooting so I don't want to flood the post with information that may not help solve the problem.

1 Nov 2012, 3:21 PM
The compiler and loader (run-time) do have different ways to resolve this question. For starters, what is the path to your Viewport (MyProject.view.Viewport)?

The classpath lists "ext/src" (probably not there ;) ) and "js" (maybe here? but as js/view/Viewport.js ?).

2 Nov 2012, 8:14 AM
Hey dongryphon,

Thanks for your reply.

Wow, that was a bit of a face-palm moment. Yeah, the viewport is located in the app folder so of course the compiler couldn't see it. I used the statement:

sencha compile -classpath=ext/src,app page -yui -in app.html -out build/app.html

and it worked fine. I'm getting yui compile warnings during the build, but it's not error-ing out. Thanks for the help!

Here's the yui working. I haven't looked into troubleshooting yet:

Yui Compressor Warning <> Trailing comma is not legal in an ECMA-262 object initializer

I get that warning even if I leave out the -yui to get an uncompressed version of the js file. Any insight on the warning?

2 Nov 2012, 1:14 PM
Glad to hear you've made forward progress. The warning is odd if you don't have YUI enabled, but we use the same (basic) parse technology as YUI to read the source code... so maybe the warning is similar but slightly different?

What version and framework are you using? I seem to recall a rogue comma that was fixed some time back...

2 Nov 2012, 1:29 PM
Lets see, I'm using ext-4.1.1a of the SDK and of the CMD tools.

Also, I'm using a macbook pro running 10.7.5 and JRE version 1.6.0_35-b10-428-11M3811 if any of that helps.

2 Nov 2012, 2:12 PM
Hey, don't worry about looking for the trailing comma in your code. After taking a closer look at the warning vs our code it turns out there indeed are trailing commas in a couple of spaces that I missed.

After clearing those up we should be getting a clean compile. Thank you very much for all of the help!

2 Nov 2012, 3:02 PM
Good news indeed :) And no problem at all.

5 Nov 2012, 7:42 AM
So after looking through the list of warnings I did find one that was in the framework created by the CMD tool. It's in the file:

The trailing comma is on line 133

I verified it shows in my other projects as well.

Hope this helps.