When running npm install [any package] or even npm install on homestead I get the following error:
npm ERR! ETXTBSY: text file is b
I struggled with this problem on my Windows 10 machine with Homestead a lot of. And After a lot of effort I solved it with that way;
delete your node_modules folder.
You run this commands on your windows terminal:
npm install --no-bin-links (After some experience it is necessary for virtual machines)
npm rebuild --no-bin links
Generally it works after these commands, but if you have take this error
"Node Sass could not find a binding for your current environment:"
please run this command on your Homestead Terminal for installing node Sass for Linux.
npm rebuild node-sass
if it is not work, try use yarn. Delete node modules folder package.json.lock and yarn.lock (if there) files and type
yarn install
If all of them is not save you, use all npm commands out of the virtual machine. It will be work.
I hope this helps you...