NPM install fails with ETXTBSY error, text file is busy

3.4k views Asked by At

Trying to use laravel-mix, but when i try npm install, or npm install --no-bin-links, or sudo npm install, i get this error below.. I'm on windows 8.1 using homestead and vagrant.. Please any help on this

npm WARN ETXTBSY: text file is busy, unlink '/home/vagrant/blog/mix/node_modules/abbrev/package.json.78971974'
npm ERR! path /home/vagrant/blog/mix/node_modules/acorn-dynamic-import/package.json.247239
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename
npm ERR! ETXTBSY: text file is busy, rename '/home/vagrant/blog/mix/node_modules/acorn-dynamic-import/package.json.247239' -> '/home/vagrant/blog/mix/node_modules/acorn-dynamic-import/package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2017-09-04T00_51_52_140Z-debug.log
1

There are 1 answers

1
Kevin Batdorf On

I had the same issue and couldn't get npm to work.

Try using yarn.

homestead ssh
sudo npm install -g yarn
cd blog/mix
yarn install