Skip to content

Issue with unpkg CDN #1812

Description

@leedsrising
Image

Lightweight Charts™ Version:

Steps/code to reproduce:
Use the following to display the lightweight chart component, as the readme recommends:

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">

Actual behavior:
I hit

app.js:108 Uncaught TypeError: this.chart.addCandlestickSeries is not a function

Expected behavior:

The chart component should show. It does if I use the following instead:

https://cdn.jsdelivr.net/npm/lightweight-charts@4.1.1/dist/lightweight-charts.standalone.production.js

My attempt at root causing:

  1. The unpkg URL without version specification pulls the latest version automatically
  2. The jsdelivr URL explicitly requests version 4.1.1
  3. The error suggests a breaking change in the latest version's API where addCandlestickSeries method may have been renamed or restructured

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists in another issue or pull request.working as intendedWorks as intended.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions