Skip to content

Node-fetch

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

Troubleshooting

Module not found: Can't resolve 'encoding'

Next.js에서 서버측에서 랜더링 할 때 fetch 사용하면 다음 에러 출력:

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

encoding 모듈 설치하자:

npm install encoding

See also

Favorite site