Skip to content

Conversation

anthonywu
Copy link

I'm using bun in my project.

Without this edit, the console shows:

 ⨯ ./app/markdown-renderer.tsx:4:1
Export default doesn't exist in target module
  2 |
  3 | import React, { useMemo, useCallback } from 'react'
> 4 | import Streamdown from 'streamdown'
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5 | import { CitationTooltip } from './citation-tooltip-portal'
  6 | import { SearchResult } from './types'
  7 |

The export default was not found in module [project]/node_modules/streamdown/dist/index.js [app-client] (ecmascript).
Did you mean to import Streamdown?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.



./app/markdown-renderer.tsx:4:1
Export default doesn't exist in target module
  2 |
  3 | import React, { useMemo, useCallback } from 'react'
> 4 | import Streamdown from 'streamdown'
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5 | import { CitationTooltip } from './citation-tooltip-portal'
  6 | import { SearchResult } from './types'
  7 |

The export default was not found in module [project]/node_modules/streamdown/dist/index.js [app-ssr] (ecmascript).
Did you mean to import Streamdown?
All exports of the module are statically known (It doesn't have dynamic exports). So it's known statically that the requested export doesn't exist.

and the browser shows:

image

With the one liner edit, the issue is unblocked.

Examining the diffs on the bun repl:

> import { Streamdown } from 'streamdown'
undefined
> Streamdown
{
  '$$typeof': Symbol(react.memo),
  type: [Function: Streamdown] { displayName: 'Streamdown' },
  compare: [Function (anonymous)]
}
> import Streamdown from 'streamdown'
> Streamdown
Object [Module] {
  ShikiThemeContext: <ref *1> {
    '$$typeof': Symbol(react.context),
    _currentValue: [ 'github-light', 'github-dark' ],
    _currentValue2: [ 'github-light', 'github-dark' ],
    _threadCount: 0,
    Provider: [Circular *1],
    Consumer: { '$$typeof': Symbol(react.consumer), _context: [Circular *1] },
    _currentRenderer: null,
    _currentRenderer2: null
  },
  Streamdown: {
    '$$typeof': Symbol(react.memo),
    type: [Function: Streamdown] { displayName: 'Streamdown' },
    compare: [Function (anonymous)]
  }
}

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

Successfully merging this pull request may close these issues.

1 participant