pug - node.js Unexpected identifier anywhere the file is called -
i'm writing app in node.js , had unexpected error on project.
when try call model in browser ,
syntaxerror: unexpected identifier
on function called in code .
for example, if go on "/session/new",
my code :
app.get('/session/new',function (req,res) { res.render('sessions/new',{locals:{ redir:req.query.redir }}); });
and error
syntaxerror: unexpected identifier @ object.function (unknown source) @ object.render (/usr/local/lib/node/.npm/jade/0.6.3/package/lib/jade.js:267:14) @ serverresponse.render (/usr/local/lib/node/.npm/express/1.0.7/package/lib/express/view.js:334:22) @ serverresponse.render (/usr/local/lib/node/.npm/express/1.0.7/package/lib/express/view.js:344:10) @ object.<anonymous> (/users/geraudmathe/desktop/nodemongo/app.js:133:6) @ param (/usr/local/lib/node/.npm/connect/0.5.2/package/lib/connect/middleware/router.js:145:21) @ pass (/usr/local/lib/node/.npm/connect/0.5.2/package/lib/connect/middleware/router.js:161:10) @ object.router [as handle] (/usr/local/lib/node/.npm/connect/0.5.2/package/lib/connect/middleware/router.js:167:6) @ next (/usr/local/lib/node/.npm/connect/0.5.2/package/lib/connect/index.js:232:23) @ next (/usr/local/lib/node/.npm/connect/0.5.2/package/lib/connect/index.js:234:17)
where /nodemongo/app.js:133:6 res.render in code.
it happen no matter code call.
i'm lost ...
i have found issue different sum of things, have unsupported attr on jade template call, eg:
<img src="something.jpg" rel="prettyphoto" />
it took me forever find out, , way start taking lumps of code out of jade template file calling in res.render.
good luck, error can lot of things.
update: http://groups.google.com/group/express-js/browse_thread/thread/b9acfc80f6acb63b?pli=1
you can use jade index.jade
debug file
Comments
Post a Comment