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

SyntaxError: Indirectly exported binding name 'default' cannot be resolved by star export entries. #5150

Closed
giladv opened this issue Sep 12, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@giladv
Copy link

giladv commented Sep 12, 2023

What version of Bun is running?

1.0.1

What platform is your computer?

Darwin 22.6.0 arm64 arm

What steps can reproduce the bug?

not sure how to isolate this exactly but i have a project that exports a config from the node-config package

// config.ts
export { default as config } from "config";

What is the expected behavior?

it should work normally.

What do you see instead?

i get the following error

SyntaxError: Indirectly exported binding name 'default' cannot be resolved by star export entries.
      at processTicksAndRejections (:1:2602)

Additional information

i managed to fix it by altering the file as follows

// config.ts
export { default as config } from "config";

// added new:
export default {};
@giladv giladv added the bug Something isn't working label Sep 12, 2023
@giladv
Copy link
Author

giladv commented Sep 12, 2023

and then another bug takes it's place :) will wait for a more stable release, keep up the good work!

@The-Code-Monkey
Copy link

I have the same issue doing what the person does above does not fix this.

Happens on this line: https://github.com/The-Code-Monkey/TechStack/blob/chore/setup-bun/packages/components/src/atoms/input/Input.tsx#L10

referencing this line: https://github.com/The-Code-Monkey/TechStack/blob/chore/setup-bun/packages/components/src/primal/index.ts#L1

Can someone explain a way to fix or when this is going to be fixed.

@0xSalman
Copy link

I have run into this issue as well. The following code does not work even with the workaround mentioned by @giladv

export { Attributes, SpanStatusCode } from '@opentelemetry/api'

The workaround I have used is like this:

import {
  Attributes as _Attributes,
  SpanStatusCode as _SpanStatusCode,
} from '@opentelemetry/api'

export type Attributes = _Attributes
export type SpanStatusCode = _SpanStatusCode

@The-Code-Monkey
Copy link

@Salman-Ahmad I found that I had to add type to all the imports too e.g. import type or import { type

@Electroid
Copy link
Contributor

Duplicate of #5426

@Electroid Electroid marked this as a duplicate of #5426 Oct 27, 2023
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants