mongodb-js / charts-embed-sdk

The easiest way to embed MongoDB Charts visualisations into your web app
https://docs.mongodb.com/charts/master/embedding-charts-sdk/
Apache License 2.0
43 stars 31 forks source link

invalid version #77

Closed sunitakodali closed 1 year ago

sunitakodali commented 1 year ago

Describe the bug Hello,

I am trying to embed dashboard(one I created). I replaced baseURL and dashboardID. When I run the code, it is throwing me an error as below. Screenshot 2023-02-08 183716

Even the local host doesn't show as 8000.

Thank you, Sunita

khanguslee commented 1 year ago

Hello @sunitakodali !

The example should be ran on http://localhost:1234 by default and not port 8000. (as per parcel documentation https://parceljs.org/features/cli/)

To run the example, did you run npm install then npm start? A quick google search found that the error you are seeing is a problem with the parcel-bundler version but in our package-lock.json file, we should be using version 1.6.1 so I am not sure if you are running a newer version of this.

sunitakodali commented 1 year ago

Yes, I did run npm install and then did npm start.

sunitakodali commented 1 year ago

It says version 1 has been deprecated. So I installed v2. Now it is running localhost:1234, but still throwing me an error as below. Screenshot 2023-02-08 192947

khanguslee commented 1 year ago

Ahh, okay I see what the problem is now. We were not aware that parcel-bundler v1 was deprecated so we will need to look into updating this package to v2.

If you install parcel-bundler v1 does everything work still? I can have a look at getting v2 working at a later time 😄

sunitakodali commented 1 year ago

parcel-bundle v1 - No it doesn't.

khanguslee commented 1 year ago

parcel-bundle v1 - No it doesn't.

You will need to use the parcel-bundler version outlined in the package.json which is exactly 1.6.1 otherwise there may be issues.

To resolve your problem fully, we would need to update all of our examples to use parcel-bundler v2 by looking at the migration guide they provided. Always happy to review a PR into this repository, otherwise it may take some time for the update to happen on our end.

sunitakodali commented 1 year ago

Hi Khanguslee, I am able to make little progress with versions, now I have new error as below. I didn't add any filter options. e1

Thanks for your time and support.

sunitakodali commented 1 year ago

I got it resolved. Thanks once again.

khanguslee commented 1 year ago

I am glad to hear that @sunitakodali! What was the problem so that others in the future can refer to this?

sunitakodali commented 1 year ago

npm i parcel-bundler
npm install
npm start

I did the above steps.