Skip to content

bug: node-fetch-native/proxy  #114

@tkjaergaard

Description

@tkjaergaard

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

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