cloudflare / cloudflare/workers-sdk

miniflare@5.20260825.0-alpha publishes index.d.ts with missing ./shared import

Open
#15,377 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.5k
Forks
1.5k
Avg merge
3d 8h
Merged PRs (30d)
186

Description

### What versions and operating system are you using?

- `miniflare@5.20260825.0-alpha`
- `typescript@7.0.2`
- Node `24.19.0`, npm `11.17.0`
- macOS `26.6.1`, arm64

### Minimal reproduction

https://github.com/screenfluent/upstream-type-repros/tree/2b0ff6d355a8631199c2d6cbe45f397f472ae222/miniflare-package

```sh
npm ci
npm run inspect-package
npm run reproduce
```

### Describe the bug

The published declaration entrypoint contains:

```ts
import { Plugin } from "./shared";
```

but the npm package does not contain a matching
`dist/src/shared.d.ts`. The package inspection produces:

```text
REPRODUCED: dist/src/index.d.ts imports ./shared, but
dist/src/shared.d.ts is missing.
```

TypeScript consequently reports:

```text
TS2307: Cannot find module './shared' or its corresponding type declarations.
```

The same published entrypoint also references several unresolved Cloudflare
workspace declaration packages; the reproduction leaves the full compiler
output visible.

### Expected behavior

The published `types` entrypoint should reference only declarations included in
the package or declared as installable dependencies.

Contributor guide

Open the contributing guide

Research direction

Start with the published miniflare package and run npm ci, npm run inspect-package, and npm run reproduce from the linked minimal reproduction. Trace how dist/src/index.d.ts is produced and packaged, including the missing ./shared declaration and unresolved Cloudflare workspace packages. Done means the published types entrypoint references only declarations included in the package or installable dependencies, without TS2307.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
release, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.