Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Wrong typings of LDOptionsCommon #944

Copy link
Copy link
@cuong-nguyenquoc-tpv-clv

Description

Is this a support request?
No

Describe the bug
LDOptionsCommon from "@launchdarkly/js-server-sdk-common" expose incorrect parameter types.
The expected options to work with ldcli dev-server is to have configuration key like below. Meanwhile, the typings from package expose options keys with postfix Uri instead of Url

import { init as LdInit } from '@launchdarkly/node-server-sdk';

const client = LdInit(LAUNCHDARKLY_SDK_KEY, {
  baseUrl: 'http://localhost:8765',
  streamUrl: 'http://localhost:8765',
  eventsUrl: 'http://localhost:8765',
});

To reproduce

  1. Install ldcli and run ldcli dev-server start
  2. Config LD client initialization like below for nodejs repo:
import { init as LdInit } from '@launchdarkly/node-server-sdk';

const client = LdInit(LAUNCHDARKLY_SDK_KEY, {
  baseUri: 'http://localhost:8765',
  streamUri: 'http://localhost:8765',
  eventsUri: 'http://localhost:8765',
});
  1. Start the nodejs project

Expected behavior
Logs

2025-10-08T16:50:40.410Z [undefined] [debug] [LaunchDarklyService] : Received put event
2025-10-08T16:50:40.412Z [undefined] [debug] [LaunchDarklyService] : Initializing all data

Logs

2025-10-08T16:45:32.737Z [undefined] [error] [LaunchDarklyService] : Not Found
2025-10-08T16:45:32.737Z [undefined] [error] [LaunchDarklyService] : Received error 404 for streaming request - giving up permanently

SDK version
9.10.2

Language version, developer tools
NodeJs 20.19.0

OS/platform
macOS Tahoe 26.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't workingpackage: sdk/server-nodeLabel for issues affecting the sdk/server-node package.Label for issues affecting the sdk/server-node package.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.