Visual Studio - installing chartjs-plugin-datalabels

JStus 41 Reputation points
2023-01-10T20:25:22.807+00:00

I have already installed chart.js nuget into my MVC app. Now I am trying to add tatals to each of my chart bars and in order to do so, according to many tutorials, I should install chartjs-plugin-datalabels but when I am trying to execute the following

npm install chartjs-plugin-datalabels --save

as suggested on https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html

I am getting an error: SELF_SIGNED_CERT_IN_CHAIN

is it safe to install it?

Developer technologies Visual Studio Setup
Developer technologies ASP.NET Other
0 comments No comments
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2023-01-11T09:29:29.96+00:00

    Hello @JStus

    Welcome to Microsoft Q&A forum.

    I checked on my side and the command worked well. This blog: More help with SELF_SIGNED_CERT_IN_CHAIN and npm may explain why this error occurred.

    So what happened?

    Old versions of the npm client used a certificate authority (CA) file that was bundled into the client itself. This was previously necessary because the client used a self-signed SSL certificate (not a great idea, but history can’t be changed).

    The bundled CA does not work with our latest SSL certificate, pushed out over the last few days. We knew this, but didn’t realize the number of people who now use npm in environments where updating nom is difficult or slow. We are rolling back to the older cert now, but since the registry is distributed by a global CDN this process is slower than we’d like, and we don’t want to break things (further) by rushing the process.

     

    Is it safe to install it?

    From the blog:

    ca = "" seems dangerous!

    It’s not. All the fix does is tell npm to stop using the bundled CA and use the CA built-in to your copy of Node. It is actually more secure than what we were doing previously, which is part of why we did it.

    If everything is updated on your side like npm, node.js etc. The installation may be blocked by some other platform/proxy… I may suggest you also post this question on npm related forums to double confirm this and see if there are some better solutions.

    Have a nice day.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. JStus 41 Reputation points
    2023-01-12T14:20:39.4366667+00:00

    Thank you!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.