ReviewOS

stacks/bun-queue

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

#759
Open glennmichael123 opened this 23 days ago · 0 comments
23 days ago

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

Sign in to comment on this issue.