-
Notifications
You must be signed in to change notification settings - Fork 99
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
typescript: Cannot find module 'tslib' #1262
Comments
🤔 you might be right that there's a missing dependency. However, mcap/typescript/core/package.json Line 60 in b304f28
|
@jtbandes oh yep that might help. I think in my case I may have had an additional monorepo/package-hoisting issue where core/nodejs were separated 😬 |
### Changelog TypeScript: Added missing dependencies on `tslib` ### Docs None ### Description Fixes #1262 When `importHelpers` is true in tsconfig.json (as it is by default with `@foxglove/tsconfig`), `tslib` must be a dependency.
Description
When importing
@mcap/nodejs
(and other packages), I'm getting an errorCannot find module 'tslib'
.Steps To Reproduce
Create a minimal
package.json
:Install dependencies and import module
npm install node -e "require('@mcap/nodejs')"
Expected Behavior
😎
Actual Behavior
Additional information
The contents of
node_modules/@mcap/nodejs/dist/cjs/src/index.js
importstslib
for the__exportStar
helper.This looks like it's been added by the
importHelpers
option, which is present in the base foxglove/tsconfig.It'd be great if tslib was a dependency, or the helpers were inlined?
Workaround
Installing
tslib
separately will resolve this issue.The text was updated successfully, but these errors were encountered: