This is just a heads-up for everyone running into the same problem as me. (In my case that mainly being a total noob to a lot of the things involved here. 🤷‍♂️)
I installed the plugin following the steps given in the README.md.
After running eleventy --serve I got the error mentioned in this issue’s title.
Banging my head against the problem for quite some time, it finally dawned on me, that it was caused by me copy-pasting
into my .eleventy.js file, totally neglecting the fact, that this was followed by the original module.exports = function(eleventyConfig) {…} already present in the file.
Placing const pluginRss = require("@11ty/eleventy-plugin-rss"); outside of the already existing module.exports function and eleventyConfig.addPlugin(pluginRss); into it, fixed the/my error. 🎉
This is just a heads-up for everyone running into the same problem as me. (In my case that mainly being a total noob to a lot of the things involved here. 🤷‍♂️)
I installed the plugin following the steps given in the README.md.
After running
eleventy --serve
I got the error mentioned in this issue’s title.Banging my head against the problem for quite some time, it finally dawned on me, that it was caused by me copy-pasting
into my .eleventy.js file, totally neglecting the fact, that this was followed by the original
module.exports = function(eleventyConfig) {…}
already present in the file.Placing
const pluginRss = require("@11ty/eleventy-plugin-rss");
outside of the already existingmodule.exports
function andeleventyConfig.addPlugin(pluginRss);
into it, fixed the/my error. 🎉