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

{{ eleventy.generator }} throwing an error in a liquid layout in 3.0.0-alpha.7 #3262

Closed
nathan-bottomley opened this issue Apr 23, 2024 · 3 comments
Labels
bug release: canary A release on the canary channel

Comments

@nathan-bottomley
Copy link

Operating system

macOS Sonoma 14.4.1

Eleventy

3.0.0-alpha.7

Describe the bug

I have a <meta> tag in the <head> of a Liquid layout that includes {{ eleventy.generator }}. However, Liquid chokes on this.

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing to "./_site/index.html" from "./src/index.html" (via EleventyTemplateError)
[11ty] 2. 'getOwnPropertyDescriptor' on proxy: trap reported non-configurability for property 'generator' which is either non-existent or configurable in the proxy target, line:13, col:40, file:./src/_includes/layouts/base.liquid, line:13, col:37 (via RenderError)
[11ty] 3. 'getOwnPropertyDescriptor' on proxy: trap reported non-configurability for property 'generator' which is either non-existent or configurable in the proxy target, line:13, col:40 (via UndefinedVariableError)
[11ty] 4. 'getOwnPropertyDescriptor' on proxy: trap reported non-configurability for property 'generator' which is either non-existent or configurable in the proxy target (via TypeError)
[11ty] 
[11ty] Original error stack trace: TypeError: 'getOwnPropertyDescriptor' on proxy: trap reported non-configurability for property 'generator' which is either non-existent or configurable in the proxy target
[11ty]     at Proxy.hasOwnProperty (<anonymous>)
[11ty]     at readJSProperty (/Users/nathan/Sites/500yeardiary.com/node_modules/liquidjs/dist/liquid.node.cjs.js:2565:51)
[11ty]     at readProperty (/Users/nathan/Sites/500yeardiary.com/node_modules/liquidjs/dist/liquid.node.cjs.js:2551:19)
[11ty]     at Context._getFromScope (/Users/nathan/Sites/500yeardiary.com/node_modules/liquidjs/dist/liquid.node.cjs.js:2518:27)
[11ty]     at _getFromScope.next (<anonymous>)
[11ty]     at toPromise (/Users/nathan/Sites/500yeardiary.com/node_modules/liquidjs/dist/liquid.node.cjs.js:499:32)
[11ty]     at toPromise (/Users/nathan/Sites/500yeardiary.com/node_modules/liquidjs/dist/liquid.node.cjs.js:505:25)
[11ty]     at toPromise (/Users/nathan/Sites/500yeardiary.com/node_modules/liquidjs/dist/liquid.node.cjs.js:505:25)
[11ty]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[11ty]     at async toPromise (/Users/nathan/Sites/500yeardiary.com/node_modules/liquidjs/dist/liquid.node.cjs.js:507:25)

I'm trying to create the smallest possible project that reproduces the problem, but without success. The problem doesn't occur out of the box, and I'm racking my brain to work out what I've done in my project that might cause it. I'm happy to try anything if anyone can suggest where to look.

In any case, I wasn't having this problem in alpha.6, so I wonder if it might be related to the work done in alpha.7 about preventing changes to Eleventy-supplied data.

Reproduction steps

No response

Expected behavior

No response

Reproduction URL

No response

Screenshots

No response

@zachleat zachleat added bug release: canary A release on the canary channel and removed needs-triage labels Apr 24, 2024
@zachleat zachleat added this to the Eleventy 3.0.0 milestone Apr 24, 2024
@zachleat
Copy link
Member

Reproduced this one! It’s {{ eleventy.generator }} in a pagination template.

@zachleat
Copy link
Member

zachleat commented Apr 24, 2024

You can use eleventyConfig.setFreezeReservedData(false) to opt-out of this behavior for now! See #3251

@zachleat
Copy link
Member

zachleat commented Apr 24, 2024

Fixed in 3.0.0-alpha.8 3.0.0-alpha.9 (now available)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug release: canary A release on the canary channel
Projects
None yet
Development

No branches or pull requests

2 participants