If there's a module is imported by both a client and server modules, it needs to be split into a module where it's in server boundary or better just a separate chunk shared by client and server modules. This is because it could be inlined in the client boundary and then being imported by server boundary, and led to errors.