laravel / homestead

MIT License
3.85k stars 1.45k forks source link

npm / node not working on latest Homestead with Virtualbox #1955

Closed goldmerc closed 4 months ago

goldmerc commented 4 months ago

Versions

Host operating system

OS X

Hello, I just updated to the latest Homestead to get Ubuntu 22.04 and PHP 8.3. I use it for Laravel development. Since the update I get an error running npm commands.

I looked through the old issues and found this https://github.com/laravel/homestead/issues/1910#issuecomment-1889538416

I tested by copying my laravel project to a not shared folder and then npm worked again. So it does seem to be that issue.

@svpernova09 you responded to the message above and said - "This looks like yet another reason not to use Virtualbox". The Homestead docs on the Laravel website suggest Virtualbox or Parallels and only have installation details for those providers. Are there other options which aren't documented? Or some other solution that I've missed?

So far, it seems my options are to pay a yearly subscription for parallels or downgrade back to ubuntu 20.04 with an earlier version of vagrant. Does anyone know which version of vagrant that I would need to go back to?

Thanks in advance for any help.

goldmerc commented 4 months ago

Looks like the issue was with libuv and recently resolved https://github.com/libuv/libuv/pull/4268

Node 21.6.2 includes the latest libuv and fixes the issue. I've upgraded node and npm is working again.