Bug Description
Summary
streamdown re-exports types from shiki in its published type declarations, but shiki is only listed as a devDependency instead of a dependency (or peerDependency).
This means that anyone using streamdown and running TypeScript type checking will get a "Cannot find module 'shiki'" error unless they install the shiki package themselves.
The tricky part is that they don't actually use shiki directly, and streamdown already bundles it into its runtime build. In practice, users end up installing a large package solely to satisfy TypeScript.
Version
streamdown@2.5.0
Evidence
dist/index.d.ts (lines 9-10):
import { BundledTheme, ThemeRegistrationAny, BundledLanguage } from 'shiki';
export { BundledLanguage, BundledTheme, ThemeRegistrationAny } from 'shiki';
package.json:
"devDependencies": {
"shiki": "^3.19.0"
}
Steps to Reproduce
- In a fresh repo,
npm i streamdown@2.5.0 (do not install shiki).
- Import anything from
streamdown in a .ts file.
- Run
tsc.
Expected Behavior
Type-checking succeeds without installing shiki separately.
Actual Behavior
tsc fails to resolve the shiki module referenced by streamdown own
declarations.
Code Sample
Streamdown Version
2.5.0
React Version
18.2.0
Node.js Version
No response
Browser(s)
No response
Operating System
None
Additional Context
No response
Bug Description
Summary
streamdownre-exports types fromshikiin its published type declarations, butshikiis only listed as adevDependencyinstead of adependency(orpeerDependency).This means that anyone using
streamdownand running TypeScript type checking will get a"Cannot find module 'shiki'"error unless they install theshikipackage themselves.The tricky part is that they don't actually use
shikidirectly, andstreamdownalready bundles it into its runtime build. In practice, users end up installing a large package solely to satisfy TypeScript.Version
streamdown@2.5.0
Evidence
dist/index.d.ts(lines 9-10):package.json:
Steps to Reproduce
npm i streamdown@2.5.0(do not install shiki).streamdownin a.tsfile.tsc.Expected Behavior
Type-checking succeeds without installing
shikiseparately.Actual Behavior
tsc fails to resolve the
shikimodule referenced bystreamdownowndeclarations.
Code Sample
Streamdown Version
2.5.0
React Version
18.2.0
Node.js Version
No response
Browser(s)
No response
Operating System
None
Additional Context
No response