javascript - 500 SyntaxError: Unexpected token (41:5) while using simple jade file -
i learning express , template using jade.i have written simple code getting below error.please let me know what's issue.
error:
500 syntaxerror: unexpected token (41:5)
at parser.pp$4.raise (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:2422:15) @ parser.pp.unexpected (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:613:10) @ parser.pp.semicolon (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:590:61) @ parser.pp$1.parseexpressionstatement (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:1002:10) @ parser.pp$1.parsestatement (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:767:22) @ parser.pp$1.parsetoplevel (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:655:25) @ parser.parse (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:525:17) @ object.parse (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn\dist\acorn.js:3300:39) @ reallyparse (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn-globals\index.js:22:16) @ findglobals (h:\nodejs-lynda\chap-5\06\start\node_modules\jade\node_modules\with\node_modules\acorn-globals\index.js:35:11)
layout.jade
doctype html html head title= title link(rel="stylesheet", href="bootstrap.min.css") body div.container block content
list.jade
i tried using below code blocks getting error in both cases:
extends layout
block content h1= title ul each flight, index in flights - flight = flight.getinformation() li= flight.number + ': ' + flight.origin + '-' + flight.destination
2. extends layout
block content h1= title ul - each flight in flights - flight= flight.getinformation() li= flight.number + ':' + flight.origin + '-' + flight.destination
getinformation() method have written in module 'flight'. parmeters 'flight' being passed js file calls list.jade.
anyone please me this.it seems there syntax error not getting that.
move body
in 1 tab.
doctype html html head title= title link(rel="stylesheet", href="bootstrap.min.css") body div.container block content
Comments
Post a Comment