Skip to content
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

Syntax Error: Unexpected character '`' #41

Open
rakesh1988 opened this issue Aug 10, 2017 · 1 comment
Open

Syntax Error: Unexpected character '`' #41

rakesh1988 opened this issue Aug 10, 2017 · 1 comment

Comments

@rakesh1988
Copy link

I am a complete newbie to jade/pug... Trying to add bootstrap to pug
i copied pug-bootstrap folder inside my views folder
changed my index.pug as follows

extends ./pug-bootstrap/_bootstrap
block body
    h1 Put your own body content here

I am getting this error when i load my index page

D:\Workspace\NodeJs\for_delete\views\pug-bootstrap\components\tabs.pug:11:13 9| if (index === active) 10| li.active > 11| a(href=`#tab${item}`,role="tab",data-toggle="tab")= item --------------------^ 12| else 13| li 14| a(href=`#tab${item}`,role="tab",data-toggle="tab")= item Syntax Error: Unexpected character '`'

Error: D:\Workspace\NodeJs\for_delete\views\pug-bootstrap\components\tabs.pug:11:13
    9| 			if (index === active)
    10| 				li.active
  > 11| 					a(href=`#tab${item}`,role="tab",data-toggle="tab")= item
--------------------^
    12| 			else
    13| 				li
    14| 					a(href=`#tab${item}`,role="tab",data-toggle="tab")= item

Syntax Error: Unexpected character '`'
    at makeError (D:\Workspace\NodeJs\for_delete\node_modules\pug-error\index.js:32:13)
    at Lexer.error (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:58:15)
    at Lexer.assertExpression (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:86:12)
    at Lexer.attrs (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:1089:18)
    at Lexer.callLexerFunction (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:1319:23)
    at Lexer.advance (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:1356:15)
    at Lexer.callLexerFunction (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:1319:23)
    at Lexer.getTokens (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:1375:12)
    at lex (D:\Workspace\NodeJs\for_delete\node_modules\pug-lexer\index.js:12:42)
    at Object.lex (D:\Workspace\NodeJs\for_delete\node_modules\pug\lib\index.js:99:27)

is it because you are using "pug": "^2.0.0-beta3" and i am using "pug": "^2.0.0-rc.3",

@rakesh1988
Copy link
Author

looks like the answer is "yes" i tried to change the my package's pug version to beta-3 and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant