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

JSON circular reference error when using JSTL template #263

Closed
zachleat opened this issue Sep 29, 2018 · 2 comments
Closed

JSON circular reference error when using JSTL template #263

zachleat opened this issue Sep 29, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@zachleat
Copy link
Member

Error writing templates: (full stack in DEBUG output)
> Having trouble writing template: _site/template/index.html (TemplateWriterWriteError)
> Converting circular structure to JSON (TypeError)
Processed 0 files in 0.12 seconds
@elbotho
Copy link

elbotho commented May 31, 2019

@zachleat when I try to run the example on jstl templates I get:

Problem writing Eleventy templates: (full stack in DEBUG output)
> Having trouble rendering template ./index.jstl (TemplateContentRenderError)
> Converting circular structure to JSON
    --> starting at object with constructor 'Object'
    |     property 'all' -> object with constructor 'Array'
    |     index 0 -> object with constructor 'Object'
    |     property 'data' -> object with constructor 'Object'
    --- property 'collections' closes the circle (TypeError)
Processed 0 files in 1.90 seconds

Probably the same bug?
The version in the example is outdated ("@11ty/eleventy": "^0.5.4")

But even If I update ("@11ty/eleventy": "^0.8.3") it results in :

Problem writing Eleventy templates: (more in DEBUG output)
> ./index.jstl contains a circular reference (using collections) to its own templateContent. (UsingCircularTemplateContentReferenceError):
    UsingCircularTemplateContentReferenceError: ./index.jstl contains a circular reference (using collections) to its own templateContent.
        at TemplateMap.populateContentDataInMap (/Volumes/data/botho/Documents/Websites/SERLO/11ty_jstl_example/eleventy-sample-jstl/node_modules/@11ty/eleventy/src/TemplateMap.js:367:17)
Processed 0 files in 1.59 seconds

Im on OSX 10.13.6, node v12.1.0 and npm v6.9.0

Did the syntax change or something?
I'm happy to try/change things and update the example if we find a solution 👍

@elbotho
Copy link

elbotho commented May 31, 2019

just checked even this minimal example as index.jstl fails:

---
title: My Template
---
test

also stable and latest node versions don't seem to change anything.

any ideas?

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

No branches or pull requests

2 participants