Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-fetch isn't in package.json and node-fetch 3 doesn't support require statements #8

Open
httpsterio opened this issue Feb 3, 2024 · 0 comments

Comments

@httpsterio
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant