Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
388 views
in Technique[技术] by (71.8m points)

laravel - Error executing NPM INSTALL inside Homestead

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.

question from:https://stackoverflow.com/questions/65599207/error-executing-npm-install-inside-homestead

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

1 Reply

0 votes
by (71.8m points)

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...