Skip to content

@poe-code/task-list dist breaks on Node 18.18/18.19 despite engines >=18.18 (import attributes) #517

Description

@kamilio

Summary

@poe-code/task-list publishes dist code using import attributes (with { type: "json" }), which is a syntax error on Node 18.18/18.19. Import attributes only landed in Node 18.20.0. This contradicts the declared engines: { "node": ">=18.18" } (same declaration in toolcraft and poe-code, which pull it in).

Repro

Found via the poe-agent-tools canary repo. On Node 18.18.2, starting the generated MCP server (toolcraft@poe-code/task-list) crashes at import time:

file:///.../node_modules/toolcraft/node_modules/@poe-code/task-list/dist/backends/markdown-dir.js:3
import taskSchema from "../schema/task.schema.json" with { type: "json" };
                                                    ^^^^

SyntaxError: Unexpected token 'with'
    at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:119:18)

Node.js v18.18.2

Works fine on Node 18.20.8 and later. Versions observed: toolcraft 0.0.94, toolcraft-openapi 0.0.94, poe-code 3.0.393.

Fix options

Either is fine, but they should agree:

  • bump engines to >=18.20 across the affected packages, or
  • build @poe-code/task-list so the published dist avoids import attribute syntax (e.g. read the JSON schema via createRequire/fs) to genuinely support 18.18+

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions