Skip to content

core-cli: missing "exports" field causes DEP0151 deprecation warnings #1774

Description

@jchris

Problem

@fireproof/core-cli@0.24.16 has "type": "module" but no "main" or "exports" field in its package.json. Node.js falls back to resolving index.js by default, which triggers DEP0151 warnings on every import:

(node:92449) [DEP0151] DeprecationWarning: No "main" or "exports" field defined in
the package.json for /path/to/node_modules/@fireproof/core-cli/ resolving the main
entry point "index.js", imported from /path/to/vibes-diy/cli/main.js.
Default "index" lookups for the main are deprecated for ES modules.

This fires twice per CLI invocation (from main.js and cmd-evento.js), showing up in user-facing output for npx vibes-diy commands.

Current package.json (relevant fields)

{
  "name": "@fireproof/core-cli",
  "version": "0.24.16",
  "type": "module"
}

No "main", "exports", or "module" field.

Fix

Add an exports field (preferred) or at minimum a main field:

{
  "exports": {
    ".": "./index.js",
    "./*": "./*.js"
  }
}

Or minimally:

{
  "main": "./index.js"
}

The index.js file exists at the package root, so the resolution is correct — it just needs to be declared explicitly.

Impact

  • Every npx vibes-diy command shows these warnings to end users
  • DEP0151 will become an error in a future Node.js version
  • Affects vibes-diy CLI (v2.0.0-dev-cli-t and later)

Reproduction

npx vibes-diy@dev system
# Two DEP0151 warnings appear before output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions