Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package npm:chart.js not found #467

Closed
artuska opened this issue Aug 17, 2016 · 14 comments
Closed

Package npm:chart.js not found #467

artuska opened this issue Aug 17, 2016 · 14 comments

Comments

@artuska
Copy link

artuska commented Aug 17, 2016

Overview

Installing of the angular-chart.js is broken.

Step to reproduce

Just try to run bower install angular-chart.js and see the erros below:

}, {
  "code": "ENOTFOUND",
  "data": {
    "endpoint": {
      "name": "chart.js",
      "source": "npm:chart.js",
      "target": "2.x"
    }
  },
  "id": "ENOTFOUND",
  "level": "error",
  "message": "Package npm:chart.js not found",
  "stacktrace": "Error: Package npm:chart.js not found\n    at createError (/usr/local/lib/node_modules/bower/lib/util/createError.js:4:15)\n    at /usr/local/lib/node_modules/bower/lib/core/resolverFactory.js:206:23\n    at _fulfilled (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:834:54)\n    at self.promiseDispatch.done (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:863:30)\n    at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:796:13)\n    at /usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:604:44\n    at runSingle (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:137:13)\n    at flush (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:125:13)\n    at nextTickCallbackWith0Args (node.js:452:9)\n    at process._tickCallback (node.js:381:13)"
}]
@artuska
Copy link
Author

artuska commented Aug 17, 2016

Well, this happens because of bower install. If I use package.json and npm install or npm install angular-chart.js instead of bower.json and bower install or bower install angular-chart.js everything is fine.

@kklein623
Copy link

+1

Having the same issue. Checked it out and the bower.json looks like chart.js is pulling in the wrong string for a version, grabbing "npm:chart.js#2.x" instead of "2.x". Best fix for now would be to just revert to 1.0.0.

@jtblin
Copy link
Owner

jtblin commented Aug 17, 2016

Have you followed the instructions in the readme and install the
bower-npm-resolver? Chart.js has dropped support for bower so it's the only
way to use bower now.
I'd recommend switching to npm anyway.

On 18 Aug 2016 6:28 AM, "kklein623" [email protected] wrote:

+1

Having the same issue. Checked it out and the bower.json looks like
chart.js is pulling in the wrong string for a version, grabbing
"npm:chart.js#2.x" instead of "2.x". Best fix for now would be to just
revert to 1.0.0.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#467 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABUxruAa8suMaxb-WfmuqE-fgWrzrCM4ks5qg27NgaJpZM4JmUFP
.

@Dr0drigues
Copy link

I have the same issue, and I followed the instructions in the readme. It seems that angular-chart.js do not find chart.js . I think this is the same problem as #466
Did somebody find a way to use this with bower ? I can't use anything else ...

@jtblin
Copy link
Owner

jtblin commented Aug 18, 2016

@TimmyParkwayd out of curiosity, why can't you use npm instead of bower?

@Dr0drigues
Copy link

Hello @jtblin .
Because my project i am using automatic injection of dependencies with bower (I have a lot of dependencies) and using npm would break the architecture of the project ... :/

@jtblin
Copy link
Owner

jtblin commented Aug 18, 2016

Maybe you should use something like webpack to combine all dependencies into a bundle and use this bundle but ¯_(ツ)_/¯.

@Dr0drigues
Copy link

There no easier way to do it ? :(
I think a lot of people would like to use it with bower and the installation doesn't seems to work as it is indicate in the readme .

@madmoizo
Copy link

madmoizo commented Aug 18, 2016

@TimmyParkwayd if you wanna know more about this npm-only choice, check here chartjs/Chart.js#3033
Anyway, you are a human being, you'll find a solution, it's our nature. good luck!

it's as simple as a :
sudo npm install -g bower-npm-resolver
add "chart.js":"npm:chart.js#latest" to your bower.json
add to your .bowerrc
"resolvers": [ "bower-npm-resolver" ]
then bower install

@qgliu
Copy link

qgliu commented Aug 18, 2016

I'm running into the same problem. I'm using gulp and bower-files to merge all the js supporting files. Although using the npm:chart can install chart with bower, it still breaks my merged file. It keeps complaining something like "Module 'chart.js' is not available". Wonder if there is a solution to that.

Edited: my problem is solved with in another issue, and here is the solution
"chart.js": "npm:chart.js#2.1.0"
Basically you need to specify the chart.js version. The default version (2.2.1) doesn't work.

@jtblin
Copy link
Owner

jtblin commented Aug 18, 2016

@TimmyParkwayd It doesn't work anymore because Chart.js removed support for bower. We'll give it a try to the 'overrides` option but if that doesn't work then we'll have to follow Chart.js and remove bower support entirely as well.

@jtblin
Copy link
Owner

jtblin commented Aug 19, 2016

Closing as duplicate of #466

@atomicleopard
Copy link

I've had this problem as well, and using the build tooling (grunt, grunt-bower-task) for this project i've been unable to resolve it using any combination of the available options. Is it possible that angular-chart.js could refer to chartjs in it's bower.json by github repo? That way bower works without requiring an npm dependency as well.

@Wolfhergang
Copy link

Wolfhergang commented Sep 22, 2016

Hi there, Charts.js bower native support its back, you could update your dependency now and it should work as expected. :)

Edit: oh... its on release candidate =(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants