No description
Find a file
2025-03-19 16:07:47 +13:00
netlify/functions/demo Initial commit 2025-02-11 11:49:52 +13:00
src Add links to function urls 2025-02-11 14:29:11 +13:00
.eleventy.js Initial commit 2025-02-11 11:49:52 +13:00
.gitignore Initial commit 2025-02-11 11:49:52 +13:00
netlify.toml Use newer function bundler 2025-02-11 13:50:16 +13:00
package-lock.json Initial commit 2025-02-11 11:49:52 +13:00
package.json Initial commit 2025-02-11 11:49:52 +13:00
README.md Add link to fix from Eleventy 2025-03-19 16:07:47 +13:00

11ty and Netlify Functions MVP

This repo is a minimum reproduction of an issue where I am attempting to use Netlify Functions to build 11ty pages on-the-fly. In this repo is a basic single page example of an 11ty site - just index.md getting parsed to HTML. Then there is the Netlify Function code in .netlify/. At the most basic, this is just importing 11ty and attempting to run it, without any settings or content. The function is accessed via a Netlify redirect at /demo.

To try this out, you'll need Netlify CLI so you can run the dev server with netlify dev.

The error I'm getting in the CLI is:

Function demo has returned an error: Cannot find module '[path to repo]/11ty-netlify-function-mvp/.netlify/functions-serve/demo/node_modules/@11ty/eleventy/src/defaultConfig.js' imported from [path to repo]/11ty-netlify-function-mvp/.netlify/functions-serve/demo/node_modules/@11ty/eleventy/src/Util/Require.js

Solved and Fixed