Published: July 30 2021
Next.js + Webpack - Fix for ModuleNotFoundError: Module not found: Error: Can't resolve '...'
If you're building a Next.js app that uses a Node.js module that only exists on the server-side such as the file system (fs) module, you may see the following error on build because the module can't be found on the client-side (the browser).