Build-time error (not runtime):

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble rendering liquid template ./src/tests/liquid-md.md (via TemplateContentRenderError)
[11ty] 2. syntax.split is not a function, file:./src/tests/liquid-md.md, line:8, col:35 (via RenderError)
[11ty] 3. syntax.split is not a function (via TypeError)
[11ty] 
[11ty] Original error stack trace: TypeError: syntax.split is not a function
[11ty]     at Object.renderAsLiquid (/Users/zachleat/Code/demo-eleventy-edge/node_modules/@11ty/eleventy/src/Plugins/EdgePlugin.js:119:26)
[11ty]     at Object.render (/Users/zachleat/Code/demo-eleventy-edge/node_modules/@11ty/eleventy/src/Plugins/Edge/LiquidEdge.js:43:23)
[11ty]     at Tag.<anonymous> (/Users/zachleat/Code/demo-eleventy-edge/node_modules/liquidjs/dist/liquid.node.cjs.js:4454:47)
[11ty]     at step (/Users/zachleat/Code/demo-eleventy-edge/node_modules/liquidjs/dist/liquid.node.cjs.js:88:23)
[11ty]     at Object.next (/Users/zachleat/Code/demo-eleventy-edge/node_modules/liquidjs/dist/liquid.node.cjs.js:69:53)
[11ty]     at /Users/zachleat/Code/demo-eleventy-edge/node_modules/liquidjs/dist/liquid.node.cjs.js:1599:38
[11ty]     at step (/Users/zachleat/Code/demo-eleventy-edge/node_modules/liquidjs/dist/liquid.node.cjs.js:88:23)
[11ty]     at Object.next (/Users/zachleat/Code/demo-eleventy-edge/node_modules/liquidjs/dist/liquid.node.cjs.js:69:53)
[11ty]     at fulfilled (/Users/zachleat/Code/demo-eleventy-edge/node_modules/liquidjs/dist/liquid.node.cjs.js:59:58)
[11ty] Copied 5 files / Wrote 0 files in 0.31 seconds (v2.0.0-canary.15)

Pinned this down to a regression in liquidjs 9.42.0, canary-16 will be pinned to 9.41.0.

To workaround this locally, just add "liquidjs": "9.41.0", to your package.json under dependencies.

0

cc @harttle I was able to narrow this down to an extra token being returned here (which resulted in extra internal-to-liquid arguments):

https://github.com/11ty/eleventy/blob/e9ca971210fa06efd2af3a7931ef368dcb085a79/src/Plugins/Edge/LiquidEdge.js#L13-L19

0

Specifically this was being returned as a token when I don’t think it should be?

{
    next: [Function (anonymous)],
    throw: [Function (anonymous)],
    return: [Function (anonymous)],
    [Symbol(Symbol.iterator)]: [Function (anonymous)]
  }
0

2.0.0-canary.16 has shipped with liquidjs pinned to 9.41.0

0
© 2022 pullanswer.com - All rights reserved.