AceMetrix / bower-license

Generates a list of bower dependencies
Apache License 2.0
15 stars 29 forks source link

Error when attempting to run through command line or gulp #8

Open topherfangio opened 9 years ago

topherfangio commented 9 years ago

I am receiving the following error when attempting to run bower-license in my directory which contains my bower_components and my bower.json file:

C:\Users\fangiot\Documents\Development\Moodys\ERSUI\component>bower-license
C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\node_modules\bower-json\node_modules\graceful-fs\polyfills.js:224
      throw er
            ^
Error: EISDIR, illegal operation on a directory
    at Error (native)
    at Object.fs.readSync (fs.js:552:19)
    at Object.fs.readSync (C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\node_modules\bower-json\node_modules\graceful-fs\polyfills.js:218:23)
    at Object.fs.readFileSync (fs.js:389:28)
    at module.exports (C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\node_modules\package-license\index.js:25:45)
    at C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\lib\index.js:48:41
    at C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\node_modules\npm-license\lib\index.js:144:9
    at C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\node_modules\npm-license\node_modules\read-installed\read-installed.js:138:5
    at C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\node_modules\npm-license\node_modules\read-installed\read-installed.js:251:14
    at asyncMap (C:\Users\fangiot\AppData\Roaming\npm\node_modules\bower-license\node_modules\npm-license\node_modules\read-installed\node_modules\slide\lib\async-map.js:27:18)

Any thoughts on how I might fix this?

In the gulp task, I have tried pointing it at both the base directory and the bower.json file to see if that helps, but I get similar errors.

Thanks!

anacronw commented 9 years ago

I just reverified and it seems to work for me

Can you list your dependencies in package.json? What version of node are you using?

mh21 commented 9 years ago

I get a similar error. It fails for e.g. sjcl (https://github.com/bitwiseshiftleft/sjcl), which has a README directory with the licenses inside of it. A simple fix is

if (potentialFilenames[i].toLowerCase() === files[j].toLowerCase() &&
    !fs.statSync(path.resolve(packagePath, files[j])).isDirectory()) {

but this does not find the licenses in the directory.

topherfangio commented 9 years ago

@badunk So sorry for the extreme delay; I never saw your response and I am no longer on that project, so I honestly don't remember what the issue was and if we ever worked around it.