HomeToolsAbout a20k

Can't Resolve FS

Error Message

Module not found: Can't resolve 'fs' in Next.js application

Remedy

Similar to async/await error in client side, this is caused by using a Node operation in the client-side component.

  • Move the fs operation to an api route and call the route from the front end
© VincentVanKoh