Error executing NPM INSTALL inside Homestead

我的未来我决定 提交于 2021-01-29 15:32:35

问题


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) 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!



来源:https://stackoverflow.com/questions/65599207/error-executing-npm-install-inside-homestead

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!