nagi1 / hill-chart

Basecamp's hill chart implementation in d3.js
MIT License
48 stars 18 forks source link

Failed to resolve entry for package "hill-chart". The package may have incorrect main/module/exports specified in its package.json.` #33

Closed thecashewtrader closed 1 year ago

thecashewtrader commented 1 year ago

I get this error after updating to version 2.0.0.

After looking through the commit history, I think https://github.com/nagi1/hill-chart/commit/5528281049604cfde2ebe04f3b81705f1700647e might be the culprit.

Minimal reproduction:

yarn create vite

Select Svelte -> SvelteKit -> Skeleton Project cd into the project directory

Add this code to src/routes/+page.svelte:

<script>
  import { onMount } from "svelte";
  import HillChart from "hill-chart";

  const createHillChart = () => {
    const hillChartData = [
      {
        description: "Item 1",
      },
    ];
    const hill = new HillChart(hillChartData);
    hill.render();
  };

  onMount(createHillChart);
</script>

<h1>Minimal Reproduction</h1>
<svg id="hill-chart" />

Run

yarn add hill-chart
yarn
yarn dev # runs `vite dev`

On navigating to http://localhost:5173, this error occurs.

nagi1 commented 1 year ago

Hey, would you please screenshot the error or atleast the use case where this error occurs.

If you have a solution in mind please submit a PR and we'll review it and merge ASAP

Thanks

thecashewtrader commented 1 year ago

Very sorry, I've edited the issue now. Do let me know if more details are needed.