postmanlabs / newman-reporter-html

Apache License 2.0
81 stars 86 forks source link

Error: Parse error on line 795: #66

Closed RuggeriLuca closed 2 years ago

RuggeriLuca commented 5 years ago

npm -v 6.7.0 newman -v 4.3.1 node -v v8.3.0

C:\TEMP>npm install -g newman-reporter-html npm WARN newman-reporter-html@1.0.2 requires a peer of newman@4 but none is installed. You must install peer dependencies yourself.

C:\TEMP>newman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv --reporters cli,html --reporter-html-template templates/htmlreqres.hbs --reporter-html-export my_reporttest.html newman

Postman Echo

□ Request Methods └ GET Request GET https://postman-echo.com/get?foo1=bar1&foo2=bar2 [200 OK, 574B, 687ms] √ response is ok √ response body has json with request queries ....

□ Auth: Digest └ DigestAuth Request GET https://postman-echo.com/digest-auth [401 Unauthorized, 353B, 141ms] √ response code is 401 √ response has WWW-Authenticate header C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:268 throw new Error(str); ^

Error: Parse error on line 795: ...pan class="pl-c1">{{<span class=" -----------------------^ Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID' at Parser.parseError (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:268:19) at Parser.parse (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:337:30) at HandlebarsEnvironment.parse (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\base.js:46:43) at compileInput (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:515:19) at ret (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:524:18) at EventEmitter. (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman-reporter-html\lib\index.js:161:22) at EventEmitter.emit (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman\node_modules\eventemitter3\index.js:203:33) at done (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman\lib\run\index.js:277:29) at C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\backpack\index.js:56:34 at PostmanCollectionRun._process (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\run.js:161:13) at PostmanCollectionRun. (C:\Users\l.ruggeri\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\run.js:166:76) at ontimeout (timers.js:469:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:264:5)

DannyDainton commented 5 years ago

Hey @RuggeriLuca

This seems to be a problem with the template that you are using rather than the reporter.

This issue is coming from this line, in the template file.

Error: Parse error on line **795**:
...pan class="pl-c1">{{<span class="
-----------------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
DannyDainton commented 2 years ago

Closing due to inactivity.