Skip to content

Fix “Module not found: Can't resolve encoding” in Next.js

New Courses Coming Soon

Join the waiting lists

I ran into this error in a Next.js application:

Module not found: Can’t resolve ‘encoding’ in …/node_modules/node-fetch/lib’

To fix this, I ran npm install encoding and the error was gone!

Here is how can I help you: