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

🐛 Bug: Eleventy template builds crash with 'unexpected token at ": string, msg..."' #5115

Closed
3 of 4 tasks
marjys opened this issue Mar 7, 2024 · 1 comment · Fixed by #5116
Closed
3 of 4 tasks
Labels
status: accepting prs Mocha can use your help with this one! type: bug a defect, confirmed by a maintainer

Comments

@marjys
Copy link
Contributor

marjys commented Mar 7, 2024

Bug Report Checklist

  • I have read and agree to Mocha's Code of Conduct and Contributing Guidelines
  • I have searched for related issues and issues with the faq label, but none matched my issue.
  • I have 'smoke tested' the code to be tested by running it outside the real test suite to get a better sense of whether the problem is in the code under test, my usage of Mocha, or Mocha itself.
  • I want to provide a PR to resolve this

Expected

Running npm start docs should build the docs without errors.

Actual

The following error from Eleventy is popping up:

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble rendering liquid template ./docs/api/reporters_base.js.html (via TemplateContentRenderError)
[11ty] 2. unexpected token at ": string, msg...", file:./docs/api/reporters_base.js.html, line:273, col:12 (via ParseError)
[11ty] 3. unexpected token at ": string, msg..." (via AssertionError)
[11ty]
[11ty] Original error stack trace: AssertionError: unexpected token at ": string, msg..."
[11ty]     at new AssertionError (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:1201:28)
[11ty]     at assert (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:1236:15)
[11ty]     at Tokenizer.readFilter (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:2245:9)
[11ty]     at Tokenizer.readFilters (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:2234:31)
[11ty]     at new Value (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:2788:34)
[11ty]     at new Output (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:4472:23)
[11ty]     at Parser.parseToken (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:4541:24)
[11ty]     at Parser.parseTokens (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:4531:33)
[11ty]     at Parser.parse (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:4525:21)
[11ty]     at Liquid.parse (/Users/marjorie/Documents/github/courses/mocha/node_modules/liquidjs/dist/liquid.node.cjs.js:4663:28)
[11ty] Benchmark   3054ms  73%     1× (Data) `./docs/_data/supporters.js`
[11ty] Benchmark    380ms   9%     1× (Data) `./docs/_data/toc.js`
[11ty] Wrote 0 files in 4.06 seconds (v1.0.2)
The script called "doc" which runs "nps docs.clean && nps docs.api && eleventy && nps docs.linkcheck" failed with exit code 1 https://github.com/sezna/nps/blob/master/other/ERRORS_AND_WARNINGS.md#failed-with-exit-code

Screenshot 2024-03-07 at 11 29 39

Minimal, Reproducible Example

This error happens when building the docs by running npm start docs

Versions

mocha version: 10.3.0
node version: v21.7.0

Additional Info

No response

@marjys marjys added status: in triage a maintainer should (re-)triage (review) this issue type: bug a defect, confirmed by a maintainer labels Mar 7, 2024
LcsK pushed a commit to LcsK/mocha that referenced this issue Mar 7, 2024
Eleventy wasn't being able to parse the JSDocs for the returned type
on the getFullErrorStack function. Defining it as a new type and then
referencing it on the function fixes the issue
LcsK added a commit to LcsK/mocha that referenced this issue Mar 7, 2024
Eleventy wasn't being able to parse the JSDocs for the returned type
on the getFullErrorStack function. Defining it as a new type and then
referencing it on the function fixes the issue
@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs Mocha can use your help with this one! and removed status: in triage a maintainer should (re-)triage (review) this issue labels Mar 7, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title 🐛 Bug: Problem writing Eleventy templates 🐛 Bug: Eleventy template builds crash with 'unexpected token at ": string, msg..."' Mar 7, 2024
@JoshuaKGoldberg
Copy link
Member

😄 looks like @LcsK might be working on a fix already?

JoshuaKGoldberg pushed a commit that referenced this issue Mar 8, 2024
Eleventy wasn't being able to parse the JSDocs for the returned type
on the getFullErrorStack function. Defining it as a new type and then
referencing it on the function fixes the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Mocha can use your help with this one! type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants