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

Chartjs 2.2.0 dependencies #452

Closed
madmoizo opened this issue Jul 29, 2016 · 12 comments
Closed

Chartjs 2.2.0 dependencies #452

madmoizo opened this issue Jul 29, 2016 · 12 comments

Comments

@madmoizo
Copy link

There is no more "dist" folder in Chartjs github repository since v2.2.0
Dependencie in bower.json should be removed

navarroaxel added a commit to navarroaxel/angular-chart.js that referenced this issue Jul 30, 2016
@wwarby
Copy link

wwarby commented Jul 31, 2016

This fix isn't included when I pull angular-chart.js from bower. Appreciate it was only committed yesterday but wondering when it might be included in the release?

@madmoizo
Copy link
Author

madmoizo commented Jul 31, 2016

@wwarby jtblin is probably on holiday, wait a bit :)

It's an exotic dependencie and bower don't know about bower-npm-resolver syntax so it won't be explicit that bower-npm-resolver is missing if someone try to bower install angular-chart.
He will get an error like "npm:chart.js#2.x can't be found/is not a branch/whatever"

Maybe it's more clear to remove the dependencie and add instructions for Chartjs installation to the readme. (and personnally, I prefer manage exotics dependencies in my bower.json)
@navarroaxel thought?

@navarroaxel
Copy link
Contributor

Hi!

The instructions are in the README.md of my pull request.
But it's true what @frlinw is saying, you have to add the bower-npm-resolver in your project and it's rare.

Maybe the best is what angular does with a bower-angular repository, that's specific for the bower instalation. Doesn't make any sense if you can use the bower installation of something deprecated.

Options:
A) Use my pull request
B) Remove the Chart.js dependency and tell to the user that he has to add it in some special way.
C) Tell to the Chart.js team, or maybe @jtblin can do, if they can create an specific repository with the bower releases, and without the non-dist files.

I prefer the option C.

@jtblin
Copy link
Owner

jtblin commented Aug 6, 2016

I was considering removing bower support in 1.x. I moved all the dependencies internally to use npm instead. I think bower is pretty much dead and everybody should use npm now so I'm not going to follow-up with the Chart.js team about why they removed it. In the past, it created issues as they were using different casing or something like that so it might be the reason why. I'm happy to merge @navarroaxel 's PR for now, but if there were going to be more issues supporting bower later on, I might just remove support for it entirely.

@goseign
Copy link

goseign commented Aug 11, 2016

bower install --save angular-chart.js
still pick Chart.js not chart.js
I noticed that downloaded bower.json is not the latest.

@navarroaxel
Copy link
Contributor

navarroaxel commented Aug 11, 2016

@goseign yes, it's true. @jtblin should release a new version (maybe 1.0.1) with the new bower.json.

@dharitdesai
Copy link

getting this in the latest version

:~] bower install --save angular-chart.js            
bower angular-chart.js#*        cached https://github.com/jtblin/angular-chart.js.git#1.0.2
bower angular-chart.js#*      validate 1.0.2 against https://github.com/jtblin/angular-chart.js.git#*
bower chart.js#2.x           ENOTFOUND Package npm:chart.js not found

@navarroaxel
Copy link
Contributor

Hey @dharitdesai, you need to add a .bowerrc file in your project with this config:

{
  "resolvers": [
    "bower-npm-resolver"
  ]
}

and install this package:

npm install -g bower-npm-resolver

@dharitdesai
Copy link

I am sorry y'all for spamming. @navarroaxel the inital comment was correct. since not all packages will have the mapper, bower update and bower install is failing. is there any other way that i can install this ?

@navarroaxel
Copy link
Contributor

It's working for me

$ bower install angular-chart.js
bower angular-chart.js#~1.0.1   cached https://github.com/jtblin/angular-chart.js.git#1.0.2
bower angular-chart.js#~1.0.1 validate 1.0.2 against https://github.com/jtblin/angular-chart.js.git#~1.0.1
bower angular-chart.js#*        cached https://github.com/jtblin/angular-chart.js.git#1.0.2
bower angular-chart.js#*      validate 1.0.2 against https://github.com/jtblin/angular-chart.js.git#*
bower chart.js#2.x              cached npm:chart.js#2.2.0
bower chart.js#2.x            validate 2.2.0 against npm:chart.js#2.x
bower angular-chart.js#~1.0.1  install angular-chart.js#1.0.2
bower chart.js#2.x             install chart.js#2.2.0
[..................] \ :
angular-chart.js#1.0.2 bower_components\angular-chart.js
├── angular#1.5.8
└── chart.js#2.2.0

chart.js#2.2.0 bower_components\chart.js

Please check you need to use the version 1.0.1+ and the bower-npm-resolver is installed globally (with -g) with NPM.
Also you can try the steps to install charts.js using bower individually

But this is an error in your end.

@GabLeRoux
Copy link

GabLeRoux commented Aug 24, 2016

Had similar problem on debian, but I was getting the following error:

bower Chart.js#^2.2.1                                       error Arguments to path.join must be strings

Stack trace:
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at ResolveCache._readPkgMeta (/usr/lib/node_modules/bower/lib/core/ResolveCache.js:337:25)
    at ResolveCache.store (/usr/lib/node_modules/bower/lib/core/ResolveCache.js:108:51)
    at /usr/lib/node_modules/bower/lib/core/PackageRepository.js:190:35
    at _fulfilled (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:796:13)
    at /usr/lib/node_modules/bower/lib/node_modules/q/q.js:604:44

Console trace:
Error
    at StandardRenderer.error (/usr/lib/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
    at Logger.<anonymous> (/usr/lib/node_modules/bower/lib/bin/bower.js:110:26)
    at Logger.emit (events.js:95:17)
    at Logger.emit (/usr/lib/node_modules/bower/lib/node_modules/bower-logger/lib/Logger.js:29:39)
    at /usr/lib/node_modules/bower/lib/commands/index.js:48:20
    at _rejected (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:844:24)
    at /usr/lib/node_modules/bower/lib/node_modules/q/q.js:870:30
    at Promise.when (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:1122:31)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:788:41)
    at /usr/lib/node_modules/bower/lib/node_modules/q/q.js:604:44
System info:
Bower version: 1.7.9
Node version: 0.10.46
OS: Linux 3.16.0-4-amd64 x64

Had same error using globally installed bower-npm-resolver.

Used solution from the following comment:
#466 (comment)

We ended up with the following in bower.json:

    "chart.js": "npm:chart.js#^2.2.1",
    "angular-chart.js": "^1.0.2",

@dharitdesai
Copy link

thanks ya'll. actually problem was that my node_modules dir was created in the parent dir. moved it. and worked.

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

No branches or pull requests

7 participants