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

Error when using bun #96

Open
heyarne opened this issue Feb 18, 2024 · 0 comments
Open

Error when using bun #96

heyarne opened this issue Feb 18, 2024 · 0 comments

Comments

@heyarne
Copy link

heyarne commented Feb 18, 2024

I know that bun support isn't mentioned anywhere on the 11ty website or in this plugin's docs, but it went surprisingly well until I hit this error:

[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble writing to "_site/index.html" from "./index.md" (via EleventyTemplateError)
[11ty] 2. Check the dynamic attribute: `@raw="content"`.
[11ty] Original error message: Can't find variable: content (via Error)
[11ty] 
[11ty] Original error stack trace: Error: Check the dynamic attribute: `@raw="content"`.
[11ty] Original error message: Can't find variable: content
[11ty]     at <anonymous> (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/moduleScript.cjs:70:22)
[11ty]     at evaluateScript (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/moduleScript.cjs:32:37)
[11ty]     at evaluateScriptInline (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/moduleScript.cjs:29:43)
[11ty]     at <anonymous> (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/ast.js:426:311)
[11ty]     at evaluateAttribute (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/ast.js:425:29)
[11ty]     at <anonymous> (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/ast.js:444:47)
[11ty]     at getPropContentAst (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/ast.js:429:29)
[11ty]     at <anonymous> (/home/arne/dev/moi/compost.party/ursula/node_modules/@11ty/webc/src/ast.js:620:124)
[11ty]     at processTicksAndRejections (:12:39)
[11ty] Wrote 0 files (skipped 1) in 0.02 seconds (v3.0.0-alpha.5)

index.md is a simple markdown file:

# Hello world

_include/page.webc looks like this (following the docs):

<!doctype html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>WebC Example</title>
	</head>
	<body @raw="content"></body>
</html>

I'm not sure this is something that needs attention, I just wanted to mention it in case someone runs into the same error. Switching to node 18 fixed it. Thanks!

$ bun --version
1.0.24
$ node --version
v18.19.0
$ cat package.json
{
  "type": "module",
  "dependencies": {
    "@11ty/eleventy": "3.0.0-alpha.5",
    "@11ty/eleventy-plugin-webc": "^0.11.2"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant