Effect CommunityEC
Effect Community3y ago
4 replies
ferossgp

Runtime Error: "Service not found: Service" in "fiberRuntime.js"

Hey! I have a strange behaviour on runtime saying fiberRuntime.js:833 Error: Service not found: Service. I created a reproduction example here https://codesandbox.io/p/sandbox/objective-firefly-flwn4y
1. in packages/ui/src/index.ts - I have a "lib" that exposes the "app" function that returns an Effect
2. in apps/web/pages/index.tsx - I try to use the "app" and it fails on runtime. If I use the "localApp", then it works.

I want to have a library and users of it should be able to provide the Services and use its functionality. Thus evreythign should be inside the "lib" and in the app I want to only create the services and provide them.

It looks like a bug to me, but maybe I misunderstand the runtime behaviour of Effect
Was this page helpful?