question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need consistent case-name for Chart/chart.js on NPM and Bower

See original GitHub issue

Please see: https://github.com/jtblin/angular-chart.js/pull/226

In short, Chart.js uses different “case” names for its library in Bower (“Chart.js”) vs NPM (“chart.js”).

This causes issues with other libraries using it as a dependency and on file systems (e.g. Linux) that are case-sensitive.

For example, when using Browserify on a Linux OS:

  • require("chart.js") will work when using NPM-based packages
  • require("Chart.js") will FAIL when using NPM-based packages
  • require("chart.js") will FAIL when using Bower-based packages
  • require("Chart.js") will work when using Bower-based packages

On OS systems where file case doesn’t matter (e.g. Mac OSX and I believe Windows), this will never surface as an issue as both OSes treat: Chart.js === chart.js

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
BrokenEyesCodecommented, Nov 2, 2016

We got it to work with bower install chartjs --save After clearing out our caches, it put "chart.js": "chartjs#^2.3.0", in our bower.json file. but that could be unique to our Artifiactory system.

1reaction
jantimoncommented, Nov 25, 2015

Should you rename it - please also stop calling it .js as RequireJs handles .js files differently than modules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use Chart.js
Install chart.js in the command prompt using npm. Chart.js Bower. How to install Chart.js with bower. bower install chart.
Read more >
Integration
Chart.js can be integrated with plain JavaScript or with different module loaders. The examples below show how to load Chart.js in different ...
Read more >
Cytoscape.js
Introduction. Factsheet. A fully featured graph library written in pure JS; Permissive open source license (MIT) for the core Cytoscape.js ...
Read more >
javascript - chart.js load totally new data
These will add/remove a single segment to/from the chart instance. So if you want to load completely new data, just loop a chart...
Read more >
How to use Chart.js - Morioh
Built using JavaScript, Chart.js requires the use of the HTML element and a ... We will cover the following topics: ... Install Chart.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found