mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 03:48:56 +00:00
When a package's exports field resolves to a file that doesn't exist, show the resolved file path in the error message instead of just "Cannot find package 'X'". This helps users understand whether the issue is a missing package or a build configuration problem. Before: error: Cannot find package 'stripe' from '/app/index.mjs' After: error: Cannot find module "/app/node_modules/stripe/esm/stripe.esm.worker.js" imported from "/app/index.mjs" This matches Node.js behavior and makes it clear that: 1. The package was found 2. The exports resolved to a specific file 3. That specific file doesn't exist (likely a bundler/build issue) Fixes: https://github.com/oven-sh/bun/issues/24848 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>