Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When running npm install [any package] or even npm install on homestead I get the following error:

npm ERR! ETXTBSY: text file is busy, rmdir '/home/vagrant/valemus-shop-starter/valemus-shop/node_modules/fsevents'

Debug log can be seen here

  • Box 'laravel/homestead' (v3.0.0)
  • Node: v8.2.1
  • NPM: 5.3.0

I tried removing the fsevents directory, however, it doesn't exist.

How do I fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
257 views
Welcome To Ask or Share your Answers For Others

1 Answer

I ran into the same thing on Windows 10 + VirtualBox (VBox) + Vagrant + Laravel Homestead when I wanted to change to react frontend.

And after much search and trial and error, this solution worked for me, maybe it works for you as well.

Halted the vagrant:

vagrant halt

Added the following into the configure section of the Vagrantfile in the Homestead dir

  config.vm.provider "virtualbox" do |v|
        v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
  end

started the cmd as admin

then vagrant up

and vagrant ssh

cd to development dir

then removed the node_modules dir by rm -rf node_modules/ if any

and then ran the sudo npm install && npm run dev

and the whole thing was installed without any warnings or errors.

This is the result of two hours reading :)

Edit:

If your problem is not solved and you have the mentioned setup you can use another solution:

Install the Node on your windows machine too

Then cd to your development directory and run the npm install from the Windows and the you'll have the same result.

You can also initiate the npm run watch from a windows cmd afterwards.

This helped me to lift the load from the VM and let the Windows do the watch and receive the notifications of the npm run watch in Windows.

Cheers


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...