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

Bug on building package with @launchdarkly/node-server-sdk as dependency #347

Closed
enniogonzalez opened this issue Jan 16, 2024 · 3 comments
Closed
Labels
bug Something isn't working package: sdk/server-node Label for issues affecting the sdk/server-node package.

Comments

@enniogonzalez
Copy link

Hey guys,

I have a library that i built with the library launchdarkly-node-server-sdk 6.2.0, and i'm trying to migrate to @launchdarkly/node-server-sdk 9.0.5, but i'm facing an issue when packing my library, the compiler throws this error

image

Logs

> tsc

node_modules/@launchdarkly/js-sdk-common/dist/internal/stream/index.d.ts:2:15 - error TS1005: ',' expected.

2 import { type StreamingErrorHandler } from './types';
                ~~~~~~~~~~~~~~~~~~~~~

node_modules/@launchdarkly/js-sdk-common/dist/internal/stream/index.d.ts:3:35 - error TS1005: ',' expected.

3 export { StreamingProcessor, type StreamingErrorHandler };
                                    ~~~~~~~~~~~~~~~~~~~~~



Found 2 errors.

SDK version
9.0.5

OS/platform
Windows 11

@enniogonzalez enniogonzalez added bug Something isn't working package: sdk/server-node Label for issues affecting the sdk/server-node package. labels Jan 16, 2024
@ismaelgt
Copy link
Contributor

ismaelgt commented Jan 16, 2024

This is the same issue I've reported here: #345 and there's a PR to fix it: #346.

Hopefully we'll get this merged soon 🙂

kinyoklion pushed a commit that referenced this issue Jan 16, 2024
**Requirements**

- [ ] ~I have added test coverage for new or changed functionality~
- [x] I have followed the repository's [pull request submission
guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
- [ ] ~I have validated my changes against all supported platform
versions~

No new functionality has been added (only types import/export
refactoring).

**Related issues**

#345
#347

**Describe the solution you've provided**

Remove the usage of [type modifiers on import
names](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-5.html#type-modifiers-on-import-names)
to improve backwards compatibility with early versions of TypeScript.

**Describe alternatives you've considered**

The obvious solution would be upgrading the TypeScript version in the
consumer, but this is not always easy (it's not in our case). [More info
here](microsoft/TypeScript#25778).
@ismaelgt
Copy link
Contributor

@kinyoklion
Copy link
Member

@enniogonzalez I am going to close this issue. Let me know if you still encounter any problem.

Thanks @ismaelgt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package: sdk/server-node Label for issues affecting the sdk/server-node package.
Projects
None yet
Development

No branches or pull requests

3 participants