Coder Social home page Coder Social logo

Comments (4)

Aankhen avatar Aankhen commented on July 17, 2024

Debug output:

  Eleventy:Template Rendering permalink for './index.webc': (data) => `${data.page.filePathStem}.${data.page.outputFileExtension}` becomes [Function (anonymous)] +1ms
[11ty] Problem writing Eleventy templates:
[11ty] link.slice is not a function (via TypeError)
  Eleventy:EleventyErrorHandler (error stack): TypeError: link.slice is not a function
  Eleventy:EleventyErrorHandler     at TemplatePermalink._addDefaultLinkFilename (/11ty-sandbox/node_modules/@11ty/eleventy/src/TemplatePermalink.js:86:25)
  Eleventy:EleventyErrorHandler     at TemplatePermalink.toOutputPath (/11ty-sandbox/node_modules/@11ty/eleventy/src/TemplatePermalink.js:95:26)
  Eleventy:EleventyErrorHandler     at TemplatePermalink.toPath (/11ty-sandbox/node_modules/@11ty/eleventy/src/TemplatePermalink.js:188:20)
  Eleventy:EleventyErrorHandler     at Template.getOutputLocations (/11ty-sandbox/node_modules/@11ty/eleventy/src/Template.js:303:19)
  Eleventy:EleventyErrorHandler     at async Template.addComputedData (/11ty-sandbox/node_modules/@11ty/eleventy/src/Template.js:609:28)
  Eleventy:EleventyErrorHandler     at async Template.getTemplates (/11ty-sandbox/node_modules/@11ty/eleventy/src/Template.js:677:7)
  Eleventy:EleventyErrorHandler     at async TemplateMap.initDependencyMap (/11ty-sandbox/node_modules/@11ty/eleventy/src/TemplateMap.js:410:22)
  Eleventy:EleventyErrorHandler     at async TemplateMap.cache (/11ty-sandbox/node_modules/@11ty/eleventy/src/TemplateMap.js:454:5)
  Eleventy:EleventyErrorHandler     at async TemplateWriter._createTemplateMap (/11ty-sandbox/node_modules/@11ty/eleventy/src/TemplateWriter.js:328:5)
  Eleventy:EleventyErrorHandler     at async TemplateWriter.generateTemplates (/11ty-sandbox/node_modules/@11ty/eleventy/src/TemplateWriter.js:358:5) +0ms
  Eleventy:Benchmark Benchmark      2ms   1%     1× (Aggregate) Configuration addPlugin +0ms
  Eleventy:Benchmark Benchmark      4ms   3%     1× (Aggregate) Searching the file system (data) +0ms
  Eleventy:Benchmark Benchmark      3ms   2%     1× (Aggregate) Searching the file system (templates) +0ms
[11ty] Wrote 0 files in 0.13 seconds (v2.0.0-canary.29)

from 11ty-website.

Aankhen avatar Aankhen commented on July 17, 2024

It works if I add front matter with a permalink: '"/"' (using WebC syntax) to the WebC file or rename it to .html. Maybe there’s a missing default for WebC permalinks or something.

from 11ty-website.

Aankhen avatar Aankhen commented on July 17, 2024

This was because of old versions. The examples works with these changes:

diff --git a/package.json b/package.json
index 41fa4fd..74c5a95 100644
--- a/package.json
+++ b/package.json
@@ -13,10 +13,10 @@
   "author": "Alex",
   "license": "MPL",
   "devDependencies": {
-    "@11ty/eleventy": "^2.0.0-canary.29",
+    "@11ty/eleventy": "^2.0.1",
     "netlify-cli": "^12.7.2"
   },
   "dependencies": {
-    "@11ty/eleventy-plugin-webc": "^0.8.1"
+    "@11ty/eleventy-plugin-webc": "^0.11.0"
   }
 }
root@7fdfcb379d31:/11ty-sandbox# git diff -- package.json
diff --git a/package.json b/package.json
index 41fa4fd..74c5a95 100644
--- a/package.json
+++ b/package.json
@@ -13,10 +13,10 @@
   "author": "Alex",
   "license": "MPL",
   "devDependencies": {
-    "@11ty/eleventy": "^2.0.0-canary.29",
+    "@11ty/eleventy": "^2.0.1",
     "netlify-cli": "^12.7.2"
   },
   "dependencies": {
-    "@11ty/eleventy-plugin-webc": "^0.8.1"
+    "@11ty/eleventy-plugin-webc": "^0.11.0"
   }
 }
root@7fdfcb379d31:/11ty-sandbox# npx eleventy
[11ty] Writing _site/index.html from ./index.webc
[11ty] Wrote 1 file in 0.14 seconds (v2.0.1)

from 11ty-website.

CanIGetaPR avatar CanIGetaPR commented on July 17, 2024

Had problems updating 11ty. Had to delete node_modules and package_lock.json to pull the new version.

from 11ty-website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.