davglass/nodejs-yui3 — Issue #19: express example doesn't work
Author: d-adamkiewicz
Created: 2011-11-23 15:48:44+00:00
State: open

when '/' is accessed it produces on console:

failed to locate view "test", tried:
- /home/darek/scripts/nodejs-yui3/examples/express/views/test.html
- /home/darek/scripts/nodejs-yui3/examples/express/views/_test.html

Error: failed to locate view "test"
at Function.compile (/home/darek/node_modules/express/lib/view.js:58:15)
at ServerResponse._render (/home/darek/node_modules/express/lib/view.js:414:18)
at ServerResponse.render (/home/darek/node_modules/express/lib/view.js:315:17)
at render (/home/darek/node_modules/express/lib/view.js:184:16)
at renderPartial (/home/darek/node_modules/express/lib/view.js:225:12)
at /home/darek/node_modules/express/lib/view.js:409:12
at Object.after (/home/darek/scripts/nodejs-yui3/examples/express/express.js:95:31)
at [object Function].render (/home/darek/node_modules/yui3/lib/yui3-express.js:369:24)
at Object. (/home/darek/node_modules/yui3/lib/yui3-express.js:265:24)
at ServerResponse._render (/home/darek/node_modules/express/lib/view.js:422:21)

The cause is 95 line of examples/express/express.js:
var str = partial('test');
However test (template) is located in views/partials/test.html so when I change it to:
var str = partial('partial/test');
it should work, but it doesn't.
It produces instead:
RangeError: Maximum call stack size exceeded
I failed to debug this - it looks like .after method is called recursively or ...

Node v0.4.11,