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 was still getting an error, even after doing following
config.vm.provider "virtualbox" do |v|
v.customize ["setextradata", :id,
"VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
as suggested by Babak Bandpey
It turned out that there was another annoying problem of file path character limit. This happens quite often if you are using a node module with long name. You can easily solve this by following these steps after vagrant ssh into linux vm:
Create ‘node_modules’ folder in your home folder
mkdir ~/node_modules
Add symbolic link to the ‘node_modules’ folder you just created inside your project folder
ln -sf ~/node_modules /vagrant/your-project-folder
This solution will ensure that all the node modules are stored inside home directory instead of synced folder. Original source : https://blog.rudylee.com/2014/10/27/symbolic-links-with-vagrant-windows/
Hope it helps somone having similar issue, thanks!