2

I'm new to AngularJS and I'm currently working on building an application on Ubuntu. When I'm trying to install Chart.js using npm install chart.js, it is throwing the following error.

npm WARN [email protected] requires a peer of jasmine-core@>=3.5 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/karma/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/compiler-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
updated 1 package and audited 19058 packages in 9.013s

23 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

What does this error mean?

How do I fix this?

Is there any other way to include Chart.js in my project other than the install command?

2
  • So far, you you didn't get any errors, only warnings. The package was installed. Doesn't it work? If so, describe it with more detail. Commented Jan 21, 2020 at 9:41
  • As far as I know the package didn't get installed because the installed package would get reflected in the package.json file. But in that file I don't see anything related to chart.js. I could be wrong. Commented Jan 21, 2020 at 10:23

3 Answers 3

1

There are 0 vulnerabilities in your install. what you call error is just WARN means warnings, which can be ignored, Chart.js has successfully installed. you should be good to go.

If you want to get rid of these warnings, as it says You must install peer dependencies yourself.

Try npm install jasmine-core@>=3.5

Sign up to request clarification or add additional context in comments.

Comments

0

npm decided to add a new command: npm fund that will provide more visibility to npm users on what dependencies are actively looking for ways to fund their work.

npm install will also show a single message at the end in order to let user aware that dependencies are looking for funding, it looks like this:

$ npm install
13 packages are looking for funding.
run `npm fund` for details.

Running npm fund will open the url listed for that given package right in your browser.

npm funding does not mean that the package is not installed , your package is successfully installed.

please check this for more information

Comments

0

you didnt get any errors only warnings, you can ignore them. first of all you can download manually from https://github.com/jtblin/angular-chart.js but you already installed them from npm so try to include it in your project

when you load your angular module dont forget to use

angular.module('myModule', ['chart.js']);

let us know if you were able to use it , best of luck !

2 Comments

Yes I tried it and the charts are getting displayed. Thanks a lot for your help :D
glad to know :) .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.