mongodb-js / charts-embed-sdk

The easiest way to embed MongoDB Charts visualisations into your web app

Home Page:https://docs.mongodb.com/charts/master/embedding-charts-sdk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

invalid version

sunitakodali opened this issue · comments

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

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.

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

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

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 😄

parcel-bundle v1 - No it doesn't.

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.

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.

I got it resolved. Thanks once again.

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

npm i parcel-bundler
npm install
npm start

I did the above steps.