Effect CommunityEC
Effect Community2y ago
110 replies
addamsson

I get ReferenceError: TextEncoder is not defined when I try to run a very simple program

I've created a unit test in my project and I can confirm that it works properly:
describe("Effect", () => {
    test("should run a program", () => {

        console.log("foo");
    });
});

but as soon as I do anything with Effect:

import { Effect } from 'effect';

describe("Effect", () => {
    test("should run a program", () => {
        Effect.succeed(1);
    });
});


I get ReferenceError: TextEncoder is not defined. What am I doing wrong?
Was this page helpful?