sheerun / bower-away

A tool for migrating away from Bower (to Yarn)
307 stars 21 forks source link

ENOENT: no such file or directory, open '[...]/.bower.json' for package loaded via git #34

Open Ugoku opened 5 years ago

Ugoku commented 5 years ago

When I run bower-away, I get the following error:

Error: ENOENT: no such file or directory, open '/opt/xxx/web/bower/angular-tablesort/.bower.json'
    at Object.openSync (fs.js:448:3)
    at Object.readFileSync (fs.js:348:35)
    at _callee$ (/opt/xxx/node_modules/bower-away/cli.js:99:40)
    at tryCatch (/opt/xxx/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/opt/xxx/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.(anonymous function) [as next] (/opt/xxx/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/opt/xxx/node_modules/bower-away/cli.js:253:30)
    at _next (/opt/xxx/node_modules/bower-away/cli.js:268:9)
    at /opt/xxx/node_modules/bower-away/cli.js:275:7
    at new Promise (<anonymous>)

angular-tablesort is loaded via a git hash (i.e. "angular-tablesort": "https://github.com/Recras/angular-tablesort.git#c369ca66c456a88c6fd1badeaed9fd8da1dbea5b" instead of "angular-tablesort": "~1.6.1") which appears to be the problem, because it also happens for a few other packages loaded in the same way.

A related issue (#17) mentions removing the offending directory, but then bower-away --apply doesn't include the package in package.json.

Is there something we can do to remedy this problem?

HarryAdney commented 4 years ago

Any update on this? I get a similar ENOENT error, but in:

"pa11y-dashboard-master\public\js\vendor\helpers.bower.json"

larissapissurno commented 4 years ago

Same error here ;/