-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
With 0.3.3 I get lexer error on first line #144
Comments
Can you share some failing feature files? |
[root@a cucumber]# cat user\ logging\ into\ system.feature | gzip -c9 - | base64 |
The file seems to be encoded as UTF-8 with BOM. Gherkin (the parser) seems to not like the marker and does not expect it at the start of the file. Try saving that file again as UTF-8 without BOM. I could get your feature to load properly by doing so. This is a known problem on Gherkin: cucumber/gherkin#100. We can't do much about it on Cucumber.js itself. |
Hi @jbpros. Would it be ok to reopen this issue until cucumber/gherkin#100 is fixed? Here's the cryptic error message I see when a feature file includes a UTF-8 BOM (http://en.wikipedia.org/wiki/Byte_order_mark): ...\node_modules\gherkin\lib\gherkin\lexer\en.js:1008
throw new Error("Lexing error on line " + this.line_number + ": '" + content + "'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.");
^
Error: Lexing error on line 1: 'Feature: Example feature'. See
http://wiki.github.com/cucumber/gherkin/lexingerror for more information.
at Lexer.scan
(...\node_modules\gherkin\lib\gherkin\lexer\en.js:1008:13)
at Object.parse
(...\node_modules\cucumber\lib\cucumber\parser.js:26:25)
at Object.getFeatures
(...\node_modules\cucumber\lib\cucumber\runtime.js:24:35)
at Object.start
(...\node_modules\cucumber\lib\cucumber\runtime.js:10:37)
at Object.self._task |
I am experiencing the same thing on the latest version 0.4.7. Just bumping this issue up in hopes it'll get fixed soon. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Previously everything was ok (0.3.2 works), the line has "Feature: " as the beginning. It happens with more
.feature
files.The text was updated successfully, but these errors were encountered: