Skip to content

package.json declares >=20.0.0 but requires >=22.0.0 #504

@atkei

Description

@atkei

Description

The package declares Node.js 20+ compatibility in package.json but actually requires Node.js 22+ due to dependencies and implementation, causing runtime errors on Node.js 20.

Current Behavior

When running rulesync on Node.js 20.19.5:

rulesync generate --targets claudecode,cursor
file:///Users/atkei/.asdf/installs/nodejs/20.19.5/lib/node_modules/rulesync/dist/index.js:72
import { globSync } from "fs";
         ^^^^^^^^
SyntaxError: The requested module 'fs' does not provide an export named 'globSync'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:213:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:320:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:606:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:117:5)

Node.js v20.19.5

Additionally, installing the package shows warnings:

npm install -g rulesync
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: '@kimuson/modular-mcp@0.0.5',
npm warn EBADENGINE   required: { node: '>=22.0.0' },
npm warn EBADENGINE   current: { node: 'v20.19.5', npm: '10.8.2' }
npm warn EBADENGINE }

Root Causes

  1. fs.globSync usage (src/utils/file.ts:1)

  2. @kimuson/modular-mcp dependency

    • Declared in dependencies (not optionalDependencies)
    • Requires "engines": { "node": ">=22.0.0" }

Environment

  • Node.js: v20.19.5
  • rulesync: v3.15.0
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions