How to check if chart.js is installed ?

Updated at 07-Aug-2022, By samar

How to check if chart.js is installed ?

In this session, we’ll try our hand at solving the "How to check if chart.js is installed ?" puzzle by using the computer language.

I want to check that the chart.js is installed on not in my node app. How can i know that the package is already installed or not in my node application using command.
  • Check package is installed or not in node app

    You can check if chart.js is installed locally or not using the npm list <package-name> command followed by package name (chart.js).

    npm list chart.js
    

    You can also check if a specific package is installed globally or not using the npm list -g <package-name>.

    npm list -g chart.js
    

    Output

    It will return the output as below if the package is not installed in node app.

    [email protected] E:\laragon\www\nodeapp
    `-- (empty) 

Back to code snippet queries related nodejs