Error with providing arguments to an effect in TypeScript using Effect library

Hey all! I'm a little stuck while trying to provide arguments to an effect. Here's what I got:
// files.ts:
export const progCopyFiles = (
  sourcePath: string,
  targetPath: string,
  options: FileSystem.CopyOptions,
) =>
  Effect.gen(function* () {
    const sourceExist = yield* doesPathExist(sourcePath);
    const targetExist = yield* doesPathExist(targetPath);
    if (!sourceExist || !targetExist) {
      return false;
    }

    const fs = yield* FileSystem.FileSystem;
    yield* fs.copy(sourcePath, targetPath, options);
    return true;
  }).pipe(
    Effect.catchAll((error) => {
      Effect.log(`[unicorn_juice] Error copying files: ${error.message}`);
      return Effect.succeed(false);
    }),
  );

// main.ts:
// ...
const didAssetsCopy = await Effect.runPromise(
  progCopyFiles(studioFolder, distFolder, { overwrite: true }).pipe(
    Effect.provide(NodeContext.layer),
  ),
);
// ...

I'm getting this error when running the effect:
Argument of type 'Effect<boolean, never, FileSystem>' is not assignable to parameter of type 'Effect<boolean, never, never>'.
  Type 'FileSystem' is not assignable to type 'never'.

I don't know why, I was trying my best to follow how it wsa setup in the docs. Any suggestions?
Was this page helpful?