Skip to content

ERR_REQUIRE_ESM #64

@Tsopic

Description

@Tsopic
⏺ PreToolUse:TodoWrite [tdd-guard] failed with non-blocking status code 1: node:internal/modules/cjs/loader:1285
      throw new ERR_REQUIRE_ESM(filename, true);
      ^

  Error [ERR_REQUIRE_ESM]: require() of ES Module 
  /Users/tsopic/.nvm/versions/node/v20.18.1/lib/node_modules/tdd-guard/node_modules/@anthropic-ai/claude-code/sdk.mjs not 
  supported.
  Instead change the require of 
  /Users/tsopic/.nvm/versions/node/v20.18.1/lib/node_modules/tdd-guard/node_modules/@anthropic-ai/claude-code/sdk.mjs to a dynamic 
  import() which is available in all CommonJS modules.
      at Object.<anonymous> 
  (/Users/tsopic/.nvm/versions/node/v20.18.1/lib/node_modules/tdd-guard/dist/validation/models/ClaudeCodeSdk.js:5:23) {
    code: 'ERR_REQUIRE_ESM'
  }

  Node.js v20.18.1

What should i do with this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions