I got the same error on webpack version 5.97.1, it appeared after I started using the "undici" package, and after deleting it, the error disappeared.