Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: node-fetch-native/proxy #114

Closed
tkjaergaard opened this issue Feb 7, 2024 · 3 comments
Closed

bug: node-fetch-native/proxy #114

tkjaergaard opened this issue Feb 7, 2024 · 3 comments

Comments

@tkjaergaard
Copy link
Contributor

Environment

Bun v.1.0.26

Reproduction

Git repo: https://github.com/tkjaergaard/giget-bun-reproduction

Steps to reproduce:

  1. Clone repository
  2. Install Bun version 1.0.26 (https://bun.sh/)
  3. Run bun install to install dependencies
  4. Run build command
$ bun build index.ts --outdir=dist --target=node

Describe the bug

When build the project using Bun, a "No matching export" error is thrown.

Additional context

Issue discovered when using unjs/giget

Original issue: #145

Logs

11 | import { fetch } from 'node-fetch-native/proxy';
              ^
error: No matching export in "node_modules/node-fetch-native/dist/proxy.cjs" for import "fetch"
    at /Users/thomaskjaergaard/projects/internal/giget-bun-reproduction/node_modules/giget/dist/index.mjs:11:10
@tkjaergaard
Copy link
Contributor Author

The issue either resides in the build.config.ts
https://github.com/unjs/node-fetch-native/blob/main/build.config.ts#L30

Or in the `package.json´ file
https://github.com/unjs/node-fetch-native/blob/main/package.json#L84-L87

If line 84-87 is removed, the build succeeds.

@pi0
Copy link
Member

pi0 commented Feb 7, 2024

Released 1.6.2. Let me know if it didn't work 👍🏼

@tkjaergaard
Copy link
Contributor Author

@pi0 It works. Build is successful 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants