vercel/ncc

github/core package fails build because of exports map

Open

#1 311 ouverte le 15 mars 2026

Voir sur GitHub
 (5 commentaires) (5 réactions) (0 assignés)JavaScript (273 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (8 841 stars)
Métriques de merge PR
 (Merge moyen 31j 15h) (7 PRs mergées en 30 j)

Description

The @github/core package has the following exports:

  "exports": {
    ".": {
      "types": "./lib/core.d.ts",
      "import": "./lib/core.js"
    }
  }

In a project which has type: "module", and simply import * as core from '@github/core', we get the following error:

ncc: Version 0.38.4 ncc: Compiling file index.js into ESM ncc: Using typescript@5.9.3 (local user-provided) Error: Module not found: Error: Package path . is not exported from package /code/node_modules/@actions/core (see exports field in /code/node_modules/@actions/core/package.json) Did you mean './@actions/core'?

im guessing this is because whatever throws this error is looking for a default export rather than import. or it is mistakenly looking up the non-existent CJS entrypoint.

im not sure what dependency of ncc throws this error so i haven't managed to debug it myself.

Guide contributeur