Skip to content

grunt build error #898

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

Closed
khwerhahn opened this issue Mar 20, 2015 · 7 comments
Closed

grunt build error #898

khwerhahn opened this issue Mar 20, 2015 · 7 comments

Comments

@khwerhahn
Copy link

Hi,

I get the following error:

Running "rev:dist" (rev) task
dist/client/app/app.js >> 8551cad9.app.js
dist/client/app/vendor.js >> 0121d770.vendor.js
Warning: Unable to read "dist/client/bower_components/Chart.js" file (Error code: EISDIR). Use --force to continue.

The bower component is there. Very strange. Can anybody pls help?

@Awk34
Copy link
Member

Awk34 commented Mar 21, 2015

EISDIR means Error IS DIRectory. Is Chart.js a directory, and instead you want to get something from inside that directory?

@khwerhahn
Copy link
Author

Its the chart.js library (https://github.com/carlcraig/tc-angular-chartjs). There are files (i.e. dist) in the directory (dist/client/bower_components/Chart.js/dist/....). I don't know why grunt throws an error since it is a normal directory?

@mariosvlad
Copy link

it's because the Chart.js ends in .js and it thinks it's a javascript file, a solution would be to exclude it from the grunt tasks.
add the exclude rule to src of rev like this

rev: {
  dist: {
    files: {
      src: [ ...,  '!**/Chart.js/**' ] 

and something similar for usemin

usemin: {
  js: [...,  '!**/Chart.js/**']

@Awk34
Copy link
Member

Awk34 commented Mar 21, 2015

Thanks @mariostesla .
In the final index.html, it should import /bower_components/Chart.js/dist/tc-angular-chartjs.min.js, not /bower_components/Chart.js. It's bad practice to include dots in directory names :/

@khwerhahn
Copy link
Author

Ok thanks. I have posted it in the tc-angular-chartjs.min.js project.

@jromero-onclick
Copy link

I am facing the same error with the library Filesaver.js (https://github.com/alferov/angular-file-saver)

Warning: Unable to read "dist/public/bower_components/file-saver.js" file (Error code: EISDIR).� Use --force to continue.

@Awk34
Copy link
Member

Awk34 commented Oct 23, 2015

@jromero-onclick see #1064

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

4 participants