bower-away icon indicating copy to clipboard operation
bower-away copied to clipboard

Fails with non-hidden `bower.json` files

Open martinffx opened this issue 7 years ago • 3 comments

The package I'm using doesn't have a hidden .bower.json file, from what I can tell both formats are used quite commonly (at least at one point in time).

bower-away should support both?

$ bower-away
Error: ENOENT: no such file or directory, open '/Users/martinrichards/code/work/angular-app/vendor/angular-bindonce/.bower.json'
    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.readFileSync (fs.js:510:33)
    at _callee$ (/Users/martinrichards/.nvm/versions/node/v6.11.3/lib/node_modules/bower-away/cli.js:99:40)
    at tryCatch (/Users/martinrichards/.nvm/versions/node/v6.11.3/lib/node_modules/bower-away/node_modules/regenerator-runtime/runtime.js:65:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/martinrichards/.nvm/versions/node/v6.11.3/lib/node_modules/bower-away/node_modules/regenerator-runtime/runtime.js:299:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/martinrichards/.nvm/versions/node/v6.11.3/lib/node_modules/bower-away/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/Users/martinrichards/.nvm/versions/node/v6.11.3/lib/node_modules/bower-away/cli.js:253:30)
    at _next (/Users/martinrichards/.nvm/versions/node/v6.11.3/lib/node_modules/bower-away/cli.js:268:9)
    at /Users/martinrichards/.nvm/versions/node/v6.11.3/lib/node_modules/bower-away/cli.js:275:7

martinffx avatar Oct 31 '17 09:10 martinffx

thanks for reporting. as a workaround remove any directories without .bower.json after bower installation

sheerun avatar Oct 31 '17 15:10 sheerun

What do you mean? I still need the package without the .bower.json?

Should I move the bower.json to .bower.json then run?

martinffx avatar Nov 01 '17 08:11 martinffx

in this case try rm -rf vendor/angular-bindonce and then bower-away

sheerun avatar Nov 01 '17 13:11 sheerun