Skip to content
Search

Node-fetch

lastmod 2025-02-14created 2023-06-285 edits

A light-weight module that brings the Fetch API to Node.js

Troubleshooting

Module not found: Can't resolve 'encoding'

In Next.js, using fetch during server-side rendering prints the following error:

Module not found: Can't resolve 'encoding' in '/home/your/Project/web/node_modules/node-fetch/lib'

Install the encoding module:

npm install encoding

See also

Favorite site

author Zer0 sitemap