0
votes

We are developing an app in Laravel, and we created a new project, we have an error when trying to run NPM INSTALL inside Homestead.

**We are using:

Vagrant 2.2.9 NPM 6.14.10 Node 12.20.0 The last homestead version We tried:

Deleting node_modules Deleting composer.json.lock Cleaning cache Reinstalling the virtual machine with the last version And other stackoverflows. But the solutions dont work.

And we can't run npm install. The error is: no such file or directory open 'home/vagrant/code/testing/node_modules/yargs/node_modules/cliui/package.json.3695679736' This is related to npm not being able to find a file.

Can you help me please?

Thanks.

1
I found the solution, you need to: 1) install NFS in your local machine (sudo apt-get install nfs-kernel-server) 2) add type: "nfs" in your Homestead.yaml after folder mapping 3) vagrant reload --provision and thats it. trying npm install now is working ok!JPinios

1 Answers

0
votes

I found the solution, you need to:

  1. install NFS in your local machine (sudo apt-get install nfs-kernel-server) if u are using ubuntu, check how to do it in windows.
  2. add type: "nfs" in your Homestead.yaml after folder mapping
  3. vagrant reload --provision

And thats it. trying npm install now is working ok!