Run into an error while upgrading 11ty to 2.0.0 #2856
-
Hi there fellow 11ties! The error code is:
Current, working version is accessible here: https://github.com/cat-a-flame/CSSHell This is my
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
I'm a bit confused. You have this in your _11ty/filters.js file, but I don't see js-beautify in your package.json dependency tree anywhere: const beautify_css = require('js-beautify').css;
const beautify_html = require('js-beautify').html;
const MarkdownIt = require('markdown-it'); "devDependencies": {
"@11ty/eleventy": "^0.12.1",
"@11ty/eleventy-plugin-rss": "^1.1.1",
"@11ty/eleventy-plugin-syntaxhighlight": "^3.1.0"
},
"dependencies": {} I don't see js-beautify as a dependency of https://github.com/11ty/eleventy-plugin-syntaxhighlight/blob/master/package.json either. So it's possible that it got refactored, or it's a sub-sub-sub dependency and you were just expecting it to be somewhere in the node_modules tree without explicitly adding it as a dependency (which is risky risky). |
Beta Was this translation helpful? Give feedback.
-
Semi-unrelated, but running npm i js-beautify -D mostly worked for me. Once you solve that, you'll start getting errors like this: undefined filter: safe (via AssertionError)
...
Original error stack trace: AssertionError: undefined filter: safe Seems to be coming from a few of your .md files. The After removing a few of the unwanted npm run build
> [email protected] build
> eleventy
[11ty] Writing _site/README/index.html from ./README.md (liquid)
[11ty] Writing _site/sitemap.xml from ./sitemap.njk
[11ty] Writing _site/feed.xml from ./rss/feed.njk
[11ty] Writing _site/about/index.html from ./about.md (liquid)
[11ty] Writing _site/contribute/index.html from ./contribute.md (liquid)
[11ty] Writing _site/index.html from ./index.njk
[11ty] Writing _site/1/index.html from ./index.njk
[11ty] Writing _site/2/index.html from ./index.njk
[11ty] Writing _site/posts/content-is-your-content/index.html from ./posts/content-is-your-content.md (liquid)
[11ty] Writing _site/posts/convenient-css-naming-conventions/index.html from ./posts/convenient-css-naming-conventions.md (liquid)
[11ty] Writing _site/posts/font-everywhere/index.html from ./posts/font-everywhere.md (liquid)
[11ty] Writing _site/posts/lets-talk-about-units/index.html from ./posts/lets-talk-about-units.md (liquid)
[11ty] Writing _site/posts/link-and-the-forgotten-accessibility/index.html from ./posts/link-and-the-forgotten-accessibility.md (liquid)
[11ty] Writing _site/posts/one-size-should-fit-all/index.html from ./posts/one-size-should-fit-all.md (liquid)
[11ty] Writing _site/posts/we-dont-float-down-here-anymore/index.html from ./posts/we-dont-float-down-here-anymore.md (liquid)
[11ty] Writing _site/posts/z-index-hell/index.html from ./posts/z-index-hell.md (liquid)
[11ty] Writing _site/posts/prefix-mess/index.html from ./posts/prefix-mess.md (liquid)
[11ty] Writing _site/posts/overspecified-specificity/index.html from ./posts/overspecified-specificity.md (liquid)
[11ty] Writing _site/posts/font-variation-misfortune/index.html from ./posts/font-variation-misfortune.md (liquid)
[11ty] Copied 13 files / Wrote 19 files in 0.13 seconds (6.8ms each, v2.0.0) |
Beta Was this translation helpful? Give feedback.
Semi-unrelated, but running npm i js-beautify -D mostly worked for me. Once you solve that, you'll start getting errors like this:
Seems to be coming from a few of your .md files. The
safe
filter is a Nunjucks filter and isn't a default LiquidJS filter. This happens because (a) LiquidJS is the default template engine for Markdown files, and (b) LiquidJS might be stricter w/ missing filters in newer versions of 11ty/LiquidJS, seeLiquidOptions#strictFilters
. Previously missing/undefined filters might have been silently ignored and now will loudly fail (which is good).After re…