sheerun / bower-away

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

fails, can't open .DS_Store/.bower.json #10

Open iharsuvorau opened 7 years ago

iharsuvorau commented 7 years ago

bower-away just fails with:

Error: ENOTDIR: not a directory, open '/Users/ihar/workspace/projects/baystore_flask/baystore/frontend/static/bower_components/.DS_Store/.bower.json'
    at Object.fs.openSync (fs.js:653:18)
    at Object.fs.readFileSync (fs.js:554:33)
    at _callee$ (/Users/ihar/.config/yarn/global/node_modules/bower-away/cli.js:83:40)
    at tryCatch (/Users/ihar/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/Users/ihar/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:299:22)
    at Generator.prototype.(anonymous function) [as next] (/Users/ihar/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/Users/ihar/.config/yarn/global/node_modules/bower-away/cli.js:214:30)
    at _next (/Users/ihar/.config/yarn/global/node_modules/bower-away/cli.js:229:9)
    at /Users/ihar/.config/yarn/global/node_modules/bower-away/cli.js:236:7
    at Promise (<anonymous>)

I ran:

$ yarn global add bower-away

And from the directory with bower.json

$ bower-away

There is a strange filename which bower-away tries to open: .DS_Store/.bower.json.

sheerun commented 7 years ago

Thanks for reporting. As a workaround please try to remove bower_components/.DS_Store

AndreKelling commented 6 years ago

same here: Error: ENOTDIR: not a directory, open '/www/project/web/themes/projectname/bower_components/.gitkeep/.bower.json'

but removing .gitkeep is making it working.

Instrumedley commented 6 years ago

@sheerun this is not possible. I believe it's a system file generated by Mac OS. As soon as you delete it, it creates again.

I'm having the same issue running bower-away

yrral86 commented 6 years ago

@Instrumedley It is generated by finder. If you close any finder windows that have that directory open, it won't be recreated.

kylesnowschwartz commented 1 year ago

deleting the contents of my .bowerrc helped get past this issue