davglass / yui-express

Example YUI 3 based View engine for ExpressJS
http://express.davglass.com
Other
68 stars 9 forks source link

Cannot call method 'set' of null #3

Open chicagoworks opened 13 years ago

chicagoworks commented 13 years ago

I've followed the install and setup instructions but get the following error:

TypeError: Cannot call method 'set' of null at Object.after (/Users/admin/Sites/yui-express/server.js:172:36)

172: Y.one('title').set('innerHTML', TITLE);

I've worked around it by adding a tag to the layout_head. Do you have an uncommitted change to the layout_head file or is there something else that I'm missing? Thought or suggestions?</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/rojkov"><img src="https://avatars.githubusercontent.com/u/33377?v=4" />rojkov</a> commented <strong> 12 years ago</strong> </div> <div class="markdown-body"> <p>I'm getting a similar error</p> <p>TypeError: Cannot call method 'set' of null at [object Function].render (/home/rozhkov/src/yui-express/node_modules/yui3/lib/yui3-express.js:301:28) at Object.<anonymous> (/home/rozhkov/src/yui-express/node_modules/yui3/lib/yui3-express.js:265:24) at ServerResponse._render (/home/rozhkov/src/yui-express/node_modules/express/lib/view.js:425:21) at ServerResponse.render (/home/rozhkov/src/yui-express/node_modules/express/lib/view.js:318:17) at /home/rozhkov/src/yui-express/server.js:161:13 ...</p> <p>In my case the failing statement is eY.one('body').set('innerHTML', content); and there is no 'body' tag in html templates</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>