Warning: backend `PlotlyJS` is not installed

I am trying to using backend of PlotlyJS in my julia code, but it shows the warning:
Warning: backend PlotlyJS is not installed.
└ @ Plots C:\Users\username.julia\packages\Plots\p3KMq\src\backends.jl:43

Then there is no any further output on the screen.

I have installed the PlotlyJS and Plots in my Project.toml, but why it still mention that I didn’t install it. Any suggestions and commons would be very appreciated.

Can you copy-paste the output of pkg> status? It could be that you’re not currently in the environment defined by the Project.toml you’re referring to?

Sure, here is the status:

[c7e460c6] ArgParse v1.1.4
[d38c429a] Contour v0.6.2
[717857b8] DSP v0.7.8
[864edb3b] DataStructures v0.18.13
[59287772] Formatting v0.4.2
[f6369f11] ForwardDiff v0.10.35
[a98d9a8b] Interpolations v0.14.7
[682c06a0] JSON v0.21.4
[b8a86587] NearestNeighbors v0.4.13
[58dd65bb] Plotly v0.4.1
[f0f68f2c] PlotlyJS v0.18.10
[92933f4c] ProgressMeter v1.7.2
[438e738f] PyCall v1.95.1
[d330b81b] PyPlot v2.11.1
[1fd47b50] QuadGK v2.8.2
[f2b01f46] Roots v2.0.12
[90137ffa] StaticArrays v1.5.21
[1986cc42] Unitful v1.13.1
[64499a7a] WriteVTK v1.18.0

I don’t see Plots.jl?

Do you develop in VSCode? Can I see a screenshot of the window?

Yes, the code I developed is in the VS code. The code itself has the Project.toml file, which will include the necessary packages for the code. But in my julia installation folders, it has another set of packages. I am thinking that it is because I didn’t give the right path to call. BTW, even when I add the Plots.jl package, it still doesn’t work, and shows the following errors

I’m not sure where the JavaScript error comes from, to be honest.
Your default Julia environment (called v1.8 if you’re at the latest release) should ideally be as light as possible to avoid compatibility issues. In particular, it’s usually a bad idea to put heavy stuff like Plots.jl in there. My suggestion would be to remove Plots.jl from your default environment, add it to your project environment and try again

Thank you for your suggestions, I think the Java error is still from the plotlyjs. I am also wondering it may be not because of the Plots.jl, because if I used the default backend, like GR, and also the defined backend, like plotly(), then it works fine, and can get the outputs.

Then do you really need PlotlyJS :innocent: ?

Haha, that is a good question, I am also hesitate. The reason I think I am trying to use PlotlyJS is because is looks better than the Plotly.

Then I’m not sure I can help much, sorry! Hope someone can take over and solve your bug :slight_smile:

Thank you anyway!

Are you interested in using just the PlotlyJS package directly without going through Plots.jl first? I can help translate the difference if you need it.

Thank you for your response, I am very happy to look that way