node-fetch isn't in package.json and node-fetch 3 doesn't support require statements
httpsterio opened this issue · comments
I had no luck implementing Sia's webmentions code which you also appear to be using (most likely due to some silly syntax errors or something else). After having a look at your config, I'm not exactly sure how it actually runs as node-fetch doesn't appear to be installed and the latest versions wouldn't work with the require statements anyways.
I solved this by just using the nodejs native fetch API which doesn't require anything else than removing
line 2: const fetch = require('node-fetch');
in /src/_data/webmentions.js