This error usually occurs when you're importing a module that is not accessible by Next. js. Like with the case of the fs module, it is simply because the module is not available on the client side, and you or a third-party package had tried to access it.