Unexpected token 'tag' jade node.js

I get:

Unexpected token 'tag' expected 'text', 'code', ':', 'newline' or 'eos' 

due to this code:

  label(for="polaziste")Polaziste 

in

 #main form(action="/raspored" method=post) label(for="polaziste")Polaziste input(type="list" id="polaziste") datalist#polaziste for pol,i in popis option(value = pol) 

Why?:)

+6
source share
2 answers

Try the following:

 label(for="polaziste") Polaziste 

Pay attention to the space in front of the Polaziste.

+8
source

For other visitors, this error also (presumably) occurs when the jade API is used incorrectly.

for documents

var fn = jade.compile('string of jade', options);

however, if you accidentally interpret this as

var fn = jade.compile('/path/to/file.jade', options);

you will have a problem. :)

0
source

Source: https://habr.com/ru/post/959497/


All Articles