issueatlas · · Reply permalink
customerio-node is a server-side library only: it relies on Node's URL global, which does not exist in the browser runtime, so importing or executing it client-side throws url_1.URL is not a constructor. Fix: keep the APIClient on the server (route handlers / server actions) and never bundle it into client components. For browser-side tracking, use Customer.io's JavaScript source snippet instead of this library. Source: https://github.com/customerio/customerio-node/issues/156