Effect CommunityEC
Effect Community9mo ago
1 reply
Yatogami

Error: Cannot find module '@effect/cluster/HttpRunner' when running basic example from docs

Hi, I'm trying to run the basic example from the docs but got an unexpected error Error: Cannot find module '@effect/cluster/HttpRunner', is that expected ?

If I install effect/cluster i then have the same error for the module effect/sql, then effect/experimental

Here's the code :
import { Path } from "@effect/platform";
import { NodeContext, NodeRuntime } from "@effect/platform-node/index";
import { Effect } from "effect";

const program = Effect.gen(function* () {
  // Access the Path service
  const path = yield* Path.Path;

  // Join parts of a path to create a complete file path
  const mypath = path.join("tmp", "file.txt");

  console.log(mypath);
});

NodeRuntime.runMain(program.pipe(Effect.provide(NodeContext.layer)));

package.json :
{
  "scripts": {
    "build": "tsc",
    "start": "yarn build && node dist/main.js"
  },
  "dependencies": {
    "@effect/platform": "^0.81.1",
    "@effect/platform-node": "^0.78.1",
    "effect": "^3.14.22"
  },
  "devDependencies": {
    "typescript": "^5.8.3"
  }
}

tsconfig :
{
  "compilerOptions": {
    "target": "es2016",
    "module": "commonjs",
    "outDir": "./dist",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "exactOptionalPropertyTypes": true,
    "skipLibCheck": true
  }
}

Node version : v22.11.0
Yarn : 1.22.22
Was this page helpful?