Skip to content

Published package unimportable: exports point at ./src which isn't in the tarball #759

Description

@glennmichael123

Summary

The published @stacksjs/bun-queue@0.1.0 cannot be imported at all: package.json points every entry at ./src/index.ts, but the tarball ships only dist/:

"module": "./src/index.ts",
"exports": { ".": { "types": "./src/index.ts", "import": "./src/index.ts" }, "./*": { "import": "./src/*" } }
$ ls node_modules/@stacksjs/bun-queue
CHANGELOG.md  dist  LICENSE.md  package.json  README.md   # no src/

Result: import '@stacksjs/bun-queue'Cannot find module '@stacksjs/bun-queue'. Downstream, @stacksjs/queue (which depends on it — see stacksjs/stacks#1969) can never load, and anything importing the queue (e.g. @stacksjs/auth) fails, silently 404ing user routes in a Stacks app.

Fix

Point the exports at what's shipped — the real entry is ./dist/src/index.js with types at ./dist/index.d.ts:

"module": "./dist/src/index.js",
"exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/src/index.js" }, "./*": { "import": "./dist/src/*" } }

(or ship src/ in files). Verified locally: with the exports patched as above, @stacksjs/bun-queue, @stacksjs/queue, and @stacksjs/auth all import cleanly.

Env

@stacksjs/bun-queue 0.1.0 · Bun 1.3.13 · macOS arm64

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