问题
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:
- 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.
- add type: "nfs" in your Homestead.yaml after folder mapping
- vagrant reload --provision
And thats it. trying npm install now is working ok!
来源:https://stackoverflow.com/questions/65599207/error-executing-npm-install-inside-homestead