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

Bower Support Dropped, no dist folder #3081

Closed
stephenHartzell opened this issue Aug 3, 2016 · 18 comments
Closed

Bower Support Dropped, no dist folder #3081

stephenHartzell opened this issue Aug 3, 2016 · 18 comments
Assignees

Comments

@stephenHartzell
Copy link

I'm not sure why bower was dropped but the bower install is not sufficient as it does not include a dist folder minified chart.js files or the bundles. Furthermore, I get all a conflict when I also have angular-chart.js in my bower file. The two different chart entries in my bower file clobber eachother and end up removing the dist folder.

@etimberg
Copy link
Member

etimberg commented Aug 3, 2016

Are you using the npm resolver as mentioned in the docs?

@RedSyInc
Copy link

RedSyInc commented Aug 3, 2016

In repository disappeared folder dist

@stephenHartzell
Copy link
Author

Yes I am using the npm resolver as described in the docs.

@simonbrunel
Copy link
Member

@stephenHartzell reasons explained in this comment. Can you post your bower.json configuration file, and also the content of the chart.js package. I just checked, and dist files should be there.

@stephenHartzell
Copy link
Author

@simonbrunel here's my bower.json:

"dependencies": {
    "angular": "^1.5.8",
    "angular-route": "^1.5.8",
    "angular-animate": "^1.5.8",
    "jquery": "^3.1.0",
    "bootstrap": "^3.3.7",
    "angular-bootstrap": "^1.3.3",
    "angular-chart.js": "^1.0.0",
    "angular-scroll": "^1.0.0",
    "chart.js": "npm:chart.js#^2.2.1"
  },
  "resolutions": {
    "jquery": "^3.1.0"
  }

Here's my .bowerrc file:

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

Starting from scratch (i.e. no bower_components directory) and running bower install produces a syntax error when it gets to chart.js because it's .bower.json looks like this:

{
  "name": "Chart.js",
  "homepage": "https://github.com/nnnick/Chart.js",
  "version": "2.2.1",
  "_release": "2.2.1",
  "_resolution": {
    "type": "version",
    "tag": "v2.2.1",
    "commit": "ab66146013a6b7c687630b414ba8731a6f25337c"
  },
  "_source": "https://github.com/nnnick/Chart.js.git",
  "_target": "2.x"
}_source": "npm:chart.js",
  "_target": "2.2.1",
  "_release": "2.2.1",
  "version": "2.2.1"
}

Note the bad syntax at _source.

The work around, is to delete the chart.js folder and then run bower install npm:chart.js. Then I have all my dependencies. With regard to the dist folder, now it appears each time I run bower install. I swear it wasn't yesterday after starting from scratch several times. In anycase, some of the files are corrupted (such as the .bower.json file) clobbering.

@simonbrunel
Copy link
Member

So do you mean it works if no previous version was installed? Looks like bower-npm-resolver messes up if there is already a version installed from a GH repository. If so, we should add that in the documentation.

@stephenHartzell
Copy link
Author

That's not quite what I mean. It'd probably be easiest for you to see it or yourself. If you grab that bower.json and run bower install you'll get an error.

@emileber
Copy link

emileber commented Aug 4, 2016

That's also kind of a breaking change, which breaks build since it does not respect the semver standard.

@simonbrunel
Copy link
Member

@stephenHartzell: I think there is a conflict with the angular-chart.js lib which install the dependency via the GH repo, not npm. It works for me if I remove the angular-chart.js dependency or if I first bower install without the npm:chart.js, then bower install npm:chart.js --save. Anyway, there is a bug here, not sure how to fix it. Maybe @jtblin will have some inputs about it?

@pelted
Copy link

pelted commented Aug 9, 2016

I have been usign Chart.js and angular-chart.js in a Rails project for some time. Went to deploy some updates to staging server and rake bower install is failing on this issue. No longer a Chart.js file at the project root or a dist dir.

@jtblin
Copy link
Contributor

jtblin commented Aug 9, 2016

@simonbrunel this has been fixed in jtblin/angular-chart.js#453 merged a few days ago.

@pelted you need to use bower-npm-resolver now that Chart.js doesn't include the dist/ folder anymore.

@sina-mirhejazi
Copy link

Hi
I tried to install ChartJS using this npm-resolver and I got this
remote: Repository not found. fatal: repository 'https://github.com/centralway/chart.js.git/' not found

Why we can't use the old way anymore?

@MiszczProgramowania
Copy link

same issue

@simonbrunel
Copy link
Member

@sina-mirhejazi @MiszczProgramowania, bower should not try to access the git repository with this method. Also, the reported URL is weird, https://github.com/centralway/chart.js.git doesn't exist and I don't think that centralway has something to do with Chart.js (@etimberg, @tannerlinsley, @zachpanz88 ?). Did you guys followed exactly the doc instructions?

@RedSyInc
Copy link

Because of bower chart.js repository not found, i had problem with install other bower packages

@emileber
Copy link

This looks like a duplicate of #3033

@simonbrunel
Copy link
Member

simonbrunel commented Sep 21, 2016

Fixed in version 2.3.0, no need to use bower-npm-resolver anymore, native Bower support is back. Also, the chart.js bower package now points on the correct repository.

@simonbrunel
Copy link
Member

@jtblin looks like you will need to revert your bower-npm-resolver change :\

futurestar425 added a commit to futurestar425/Angular_Chart that referenced this issue Sep 5, 2024
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

9 participants