-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'filename' of undefined #403
Comments
recent jades have |
2.5.0 |
Weird thing is that I get this:
So it gets into my first template just fine. :\ UPDATE: I commented out my error handler and got this message instead:
|
hmm express should be setting that for you, could you post part of that route and the package.json deps? are you using kue? |
I'm not using kue. (should I be?) app.js (I stripped it down as much as I could and still not working)
package.json
|
hmm that jade is pretty old (we're on 0.17.0 now) maybe updating to a more recent one will help |
As stated in my first message, I'm on 0.17.0 now. :-/
|
sorry all I saw was |
I reverted to my previous version and started testing each jade version since 0.14.2. Version 0.15.4 works perfectly well and the "Cannot read property 'filename' of undefined" problem starts happening with version 0.16.0. Do you remember any changes between those two versions that could explain my problem? |
unless you're using the newer |
Does this help at all?
|
express would be adding it lower than that, if you do |
I've nailed it down to this:
I'm not too sure why it would have an effect on jade but it does. These functions are use all over the place in my templates to allow translations. Example:
Do you have any idea why it wouldn't work anymore? |
ohhhhh that makes sense, jade uses a var called |
Changed __ to __i and it's working now. Bah! Thanks a ton for your support and especially, your patience :). |
I just ran into exactly the same problem. Given that i18n is going to be pretty common, would it make sense to use a different internal var in jade for this? maybe __lineno? |
why not just use |
Because that's also very commonly used globally for the excellent underscore.js: |
I submitted pull #449, and chose __jade (since you might want to add more things than just line number and filename in future). |
haha yeah im aware of underscore but I didn't think about that since I dont use it. I guess we could change it |
Yeah. Since you allow adding user named vars into that scope, probably best to avoid anything that isn't clearly an internal name. Hence |
yup |
@visionmedia That's done now, right? |
Yes |
I've upgraded jade from 0.14.2 to 0.17.0 and I can't run my app anymore.
I tried stripping my app to empty views and controllers and no dice.
Do you have any idea what changed between those two versions that would cause this?
The text was updated successfully, but these errors were encountered: