Runtime Exception: Service Not Found in Effect Program

Is this a bug or working as expected?:
import { FetchHttpClient, HttpClient } from '@effect/platform';
import { Effect, pipe } from 'lib';

class ProxyHttpClient extends Effect.Service<ProxyHttpClient>()(
  'ProxyHttpClient',
  {
    effect: HttpClient.HttpClient,
    dependencies: [],
  },
) {}

const program = Effect.gen(function* () {
  yield* ProxyHttpClient;
});

// ❌ Runtime exception: "Error: Service not found: ProxyHttpClient"
// ❌ No type error
pipe(program, Effect.provide(FetchHttpClient.layer), Effect.runSync);
Was this page helpful?