Ошибка npm Install на Laravel Homestead или Vagrant

При попытке запустить команду "npm install" на чистом Homestead у меня эта операция завершалась ошибкой:

vagrant@foo:~/code$ npm install
npm ERR! path /home/vagrant/code/node_modules/cliui/node_modules/ansi-regex/package.json.3499778098
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/node_modules/cliui/node_modules/ansi-regex/package.json.3499778098'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2019-07-15T14_34_13_985Z-debug.log

Пробовал такие варианты решения проблемы:
1. Попробовать другие версии nodejs.
2. Попробовать установить пакеты, которые не находит. Но этот вариант каждый раз по цепочке выдавал другой пакет.

Частично проблема решается если использовать yarn. Yarn установит пакеты, но если вам нужно будет выполнить другие команды npm, то у вас все равно не получится.

Немного погуглив нашел решение проблемы. Проблема оказалась в синхронизации папок между гостевой машиной и основной системой. И она по видимому проявляется в связке
VirtualBox, Vagrant, NPM. Вам нужно тип синхронизации папок установить "smb" или "nfs". Я установил "nfs" и мне это помогло. Может это кому-то еще поможет.

Пример части конфига Homestead.

folders:
    -
        map: /home/user/hosts/example-app
        to: /home/vagrant/code
        type: "nfs"

Об этом я прочитат тут и тут.

 

комментарии (4)

Boristiq Boristiq 2021-01-09 19:21:28
Drugs information sheet. Effects of Drug Abuse. <a href="https://prednisone4u.top">prednisone no prescription</a> in the USA. Everything trends of drug. Read information here. [url=https://bankaportal.com/yurdum-insanindan-gulduren-panolar/#comment-17393]Some what you want to know about drugs.[/url] [url=http://bpo.gov.mn/content/223]Actual trends of meds.[/url] [url=http://bpo.gov.mn/content/181]Some what you want to know about medicine.[/url] 7c35273
Boristiq Boristiq 2021-01-09 21:45:13
Medicines information sheet. What side effects can this medication cause? <a href="https://allopurinol4u.top">can you buy allopurinol</a> in USA Some information about pills. Get here. https://amp.en.vaskar.co.in/translate/1?to=ru&from=en&source=Drugs%20information%20for%20patients.%20What%20side%20effects%3F%20%0D%0Aonline%20allopurinol%20https%3A%2F%2Fallopurinol4u.top%20in%20the%20USA%20%0D%0AEverything%20what%20you%20want%20to%20know%20about%20medicine.%20Read%20information%20now.%20%0D%0A%20%0D%0Ahttps%3A%2F%2Fakarui-mirai.blog.ss-blog.jp%2F2012-05-05-1%3Fcomment_success%3D2021-01-10T00%3A13%3A20%26time%3D1610205200%20Best%20information%20about%20medicine.%20http%3A%2F%2F1fbktabor.cz%2Felevove%2Fmikulas-s-doprovodem-navstivil-trenink-elevu%20Actual%20news%20about%20meds.%20http%3A%2F%2Falim.mn%2Farticle%2F1335%20Best%20about%20pills.%20%202f6fcf1%20&result=%D0%98%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85%20%D0%B4%D0%BB%D1%8F%20%D0%BF%D0%B0%D1%86%D0%B8%D0%B5%D0%BD%D1%82%D0%BE%D0%B2.%20%D0%9A%D0%B0%D0%BA%D0%B8%D0%B5%20%D0%BF%D0%BE%D0%B1%D0%BE%D1%87%D0%BD%D1%8B%D0%B5%20%D1%8D%D1%84%D1%84%D0%B5%D0%BA%D1%82%D1%8B%3F%20%D0%BE%D0%BD%D0%BB%D0%B0%D0%B9%D0%BD%20%D0%90%D0%BB%D0%BB%D0%BE%D0%BF%D1%83%D1%80%D0%B8%D0%BD%D0%BE%D0%BB%20https%3A%2F%2Fallopurinol4u.top%20%D0%B2%20%D0%A1%D0%A8%D0%90%20%D0%B2%D1%81%D0%B5%2C%20%D1%87%D1%82%D0%BE%20%D0%B2%D1%8B%20%D1%85%D0%BE%D1%82%D0%B8%D1%82%D0%B5%20%D0%B7%D0%BD%D0%B0%D1%82%D1%8C%20%D0%BE%20%D0%BC%D0%B5%D0%B4%D0%B8%D1%86%D0%B8%D0%BD%D0%B5.%20%D0%A7%D0%B8%D1%82%D0%B0%D0%B9%D1%82%D0%B5%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8E%20%D0%BF%D1%80%D1%8F%D0%BC%D0%BE%20%D1%81%D0%B5%D0%B9%D1%87%D0%B0%D1%81.%20https%3A%2F%2Fakarui-mirai.blog.ss-blog.jp%2F2012-05-05-1%3Fcomment_success%3D2021-01-10T00%3A13%3A20%26time%3D1610205200%20%D0%BB%D1%83%D1%87%D1%88%D0%B0%D1%8F%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D0%BC%D0%B5%D0%B4%D0%B8%D1%86%D0%B8%D0%BD%D0%B5.%20http%3A%2F%2F1fbktabor.cz%2Felevove%2Fmikulas-s-doprovodem-navstivil-trenink-elevu%20%D0%B0%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5%20%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85.%20http%3A%2F%2Falim.mn%2Farticle%2F1335%20%D0%BB%D1%83%D1%87%D1%88%D0%B5%20%D0%B2%D1%81%D0%B5%D0%B3%D0%BE%20%D0%BE%20%D1%82%D0%B0%D0%B1%D0%BB%D0%B5%D1%82%D0%BA%D0%B0%D1%85.%202f6fcf1 Actual about drug. https://bass93.ru/products/alphard-machete-sport-15d2#comment_230464 All news about drug. https://amp.google-wiki.info/translate/1?to=ru&from=en&source=Pills%20information.%20Generic%20Name.%20%0D%0A%3Ca%20href%3D%22https%3A%2F%2Fdiltiazem4u.top%22%3Ecost%20of%20diltiazem%3C%2Fa%3E%20in%20the%20USA%20%0D%0AEverything%20trends%20of%20medicament.%20Read%20information%20now.%20%0D%0A%20%0D%0Ahttps%3A%2F%2Fakarui-mirai.blog.ss-blog.jp%2FHONDA-N-BOX-SLASH-X-TD1-01%3Fcomment_success%3D2021-01-10T00%3A13%3A20%26time%3D1610205200%20Everything%20what%20you%20want%20to%20know%20about%20medicines.%20https%3A%2F%2Fakarui-mirai.blog.ss-blog.jp%2FVW-Golf7-2015-02-Program-Version-up%3Fcomment_success%3D2021-01-10T00%3A13%3A26%26time%3D1610205206%20Best%20trends%20of%20drug.%20http%3A%2F%2Falim.mn%2Farticle%2F1335%20Best%20about%20pills.%20%204_626c7%20&result=%D0%98%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D1%82%D0%B0%D0%B1%D0%BB%D0%B5%D1%82%D0%BA%D0%B0%D1%85.%20%D0%A0%D0%BE%D0%B4%D0%BE%D0%B2%D0%BE%D0%B5%20%D0%98%D0%BC%D1%8F.%20%3Ca%20href%3D%22https%3A%2F%2Fdiltiazem4u.top%22%20%3E%20%D1%81%D1%82%D0%BE%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D1%8C%20%D0%94%D0%B8%D0%BB%D1%82%D0%B8%D0%B0%D0%B7%D0%B5%D0%BC%D0%B0%3C%20%2F%20a%20%3E%20%D0%B2%20%D0%A1%D0%A8%D0%90%20%D0%B2%D1%81%D0%B5%20%D1%82%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD%D1%86%D0%B8%D0%B8%20%D0%BC%D0%B5%D0%B4%D0%B8%D0%BA%D0%B0%D0%BC%D0%B5%D0%BD%D1%82%D0%BE%D0%B7%D0%BD%D0%BE%D0%B3%D0%BE%20%D0%BB%D0%B5%D1%87%D0%B5%D0%BD%D0%B8%D1%8F.%20%D0%A7%D0%B8%D1%82%D0%B0%D0%B9%D1%82%D0%B5%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8E%20%D0%BF%D1%80%D1%8F%D0%BC%D0%BE%20%D1%81%D0%B5%D0%B9%D1%87%D0%B0%D1%81.%20https%3A%2F%2Fakarui-mirai.blog.ss-blog.jp%2FHONDA-N-BOX-SLASH-X-TD1-01%3Fcomment_success%3D2021-01-10T00%3A13%3A20%26time%3D1610205200%20%D0%B2%D1%81%D0%B5%2C%20%D1%87%D1%82%D0%BE%20%D0%B2%D1%8B%20%D1%85%D0%BE%D1%82%D0%B8%D1%82%D0%B5%20%D0%B7%D0%BD%D0%B0%D1%82%D1%8C%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85.%20https%3A%2F%2Fakarui-mirai.blog.ss-blog.jp%2FVW-Golf7-2015-02-Program-Version-up%3Fcomment_success%3D2021-01-10T00%3A13%3A26%26time%3D1610205206%20%D0%BB%D1%83%D1%87%D1%88%D0%B8%D0%B5%20%D1%82%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD%D1%86%D0%B8%D0%B8%20%D1%80%D0%B0%D0%B7%D0%B2%D0%B8%D1%82%D0%B8%D1%8F%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B5%D0%BD%D0%BD%D1%8B%D1%85%20%D1%81%D1%80%D0%B5%D0%B4%D1%81%D1%82%D0%B2.%20http%3A%2F%2Falim.mn%2Farticle%2F1335%20%D0%BB%D1%83%D1%87%D1%88%D0%B5%20%D0%B2%D1%81%D0%B5%D0%B3%D0%BE%20%D0%BE%20%D1%82%D0%B0%D0%B1%D0%BB%D0%B5%D1%82%D0%BA%D0%B0%D1%85.%204_626c7 Some what you want to know about drugs. 52735a8
Boristiq Boristiq 2021-01-10 02:35:32
Medicine information. Effects of Drug Abuse. <a href="https://prednisone4u.top">where can i buy generic prednisone pill</a> in the USA. Actual trends of medicine. Get information here. [url=https://amp.en.vaskar.co.in/translate/1?to=ru&from=en&source=Medicament%20information%20for%20patients.%20Brand%20names.%20%3Ca%20href%3D%22https%3A%2F%2Fviagra4u.top%22%3Ehow%20to%20get%20generic%20viagra%20no%20prescription%3C%2Fa%3E%20in%20Canada.%20All%20trends%20of%20drugs.%20Read%20information%20now.%20%0D%0A%3Ca%20href%3Dhttp%3A%2F%2F1411tube.com%2Fforum.php%3Fmod%3Dviewthread%26tid%3D11418%26pid%3D2042722%26page%3D209%26extra%3Dpage%253D1%23pid2042722%3EBest%20what%20you%20want%20to%20know%20about%20medication.%3C%2Fa%3E%20%3Ca%20href%3Dhttps%3A%2F%2Falmohaimeed.net%2Fm%2Far%2F57%3EAll%20news%20about%20medicine.%3C%2Fa%3E%20%3Ca%20href%3Dhttp%3A%2F%2F9xhi.com%2FHA_32003238.html%3EBest%20about%20medicament.%3C%2Fa%3E%20%203ca3c01%20&result=%D0%98%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85%20%D0%B4%D0%BB%D1%8F%20%D0%BF%D0%B0%D1%86%D0%B8%D0%B5%D0%BD%D1%82%D0%BE%D0%B2.%20%D0%A4%D0%B8%D1%80%D0%BC%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5%20%D0%BD%D0%B0%D0%B8%D0%BC%D0%B5%D0%BD%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F.%20%3Ca%20href%3D%22https%3A%2F%2Fviagra4u.top%22%20%3E%D0%BA%D0%B0%D0%BA%20%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C%20%D0%B4%D0%B6%D0%B5%D0%BD%D0%B5%D1%80%D0%B8%D0%BA%20%D0%92%D0%B8%D0%B0%D0%B3%D1%80%D0%B0%20%D0%B1%D0%B5%D0%B7%20%D1%80%D0%B5%D1%86%D0%B5%D0%BF%D1%82%D0%B0%3C%2Fa%3E%20%D0%B2%20%D0%9A%D0%B0%D0%BD%D0%B0%D0%B4%D0%B5.%20%D0%92%D1%81%D0%B5%20%D1%82%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD%D1%86%D0%B8%D0%B8%20%D1%80%D0%B0%D0%B7%D0%B2%D0%B8%D1%82%D0%B8%D1%8F%20%D0%BD%D0%B0%D1%80%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%BE%D0%B2.%20%D0%A7%D0%B8%D1%82%D0%B0%D0%B9%D1%82%D0%B5%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8E%20%D0%BF%D1%80%D1%8F%D0%BC%D0%BE%20%D1%81%D0%B5%D0%B9%D1%87%D0%B0%D1%81.%20%3C%D0%B0%20href%3Dhttp%3A%2F%2F1411tube.com%2Fforum.php%3Fmod%3Dviewthread%26tid%3D11418%26pid%3D2042722%26page%3D209%26extra%3Dpage%3D1%23pid2042722%3E%D0%BB%D1%83%D1%87%D1%88%D0%B5%20%D0%B2%D1%81%D0%B5%D0%B3%D0%BE%20%D1%82%D0%BE%2C%20%D1%87%D1%82%D0%BE%20%D0%B2%D1%8B%20%D1%85%D0%BE%D1%82%D0%B8%D1%82%D0%B5%20%D0%B7%D0%BD%D0%B0%D1%82%D1%8C%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85.%3C%20%2F%20a%3E%20%3Ca%20href%3Dhttps%3A%2F%2Falmohaimeed.net%2Fm%20%2F%20ar%20%2F%2057%3E%D0%92%D1%81%D0%B5%20%D0%BD%D0%BE%D0%B2%D0%BE%D1%81%D1%82%D0%B8%20%D0%BE%20%D0%BC%D0%B5%D0%B4%D0%B8%D1%86%D0%B8%D0%BD%D0%B5.%3C%20%2F%20a%3E%20%3Ca%20href%3Dhttp%3A%2F%2F9xhi.com%2FHA_32003238.html%3E%D0%BB%D1%83%D1%87%D1%88%D0%B5%20%D0%B2%D1%81%D0%B5%D0%B3%D0%BE%20%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%B0%D1%85.%3C%20%2F%20a%3E%203ca3c01]Best information about drug.[/url] [url=https://hotelsangiorgio.net/my-product/quite-close-to-the-city-centre/?lang=en]Some what you want to know about medicine.[/url] [url=https://amp.en.vaskar.co.in/translate/1?to=ru&from=en&source=Pills%20information%20for%20patients.%20What%20side%20effects%20can%20this%20medication%20cause%3F%20%3Ca%20href%3D%22https%3A%2F%2Fprednisone4u.top%22%3Eget%20cheap%20prednisone%3C%2Fa%3E%20in%20US.%20All%20trends%20of%20medicine.%20Read%20here.%20%0D%0A%3Ca%20href%3Dhttp%3A%2F%2Fbpo.gov.mn%2Fcontent%2F535%3EEverything%20about%20drugs.%3C%2Fa%3E%20%3Ca%20href%3Dhttps%3A%2F%2Fhoacuoivip.vn%2Fnhung-dieu-co-the-ban-chua-biet-ve-le-an-hoi.html%23comment-18011%3EAll%20trends%20of%20drug.%3C%2Fa%3E%20%3Ca%20href%3Dhttp%3A%2F%2Fjapaninfo.jp%2Frecuruitforum%2F%3Fmod%3Ddocument%26uid%3D394%23kboard-comments-394%3EActual%20information%20about%20medicine.%3C%2Fa%3E%20%203c01d9a%20&result=%D0%98%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D1%82%D0%B0%D0%B1%D0%BB%D0%B5%D1%82%D0%BA%D0%B0%D1%85%20%D0%B4%D0%BB%D1%8F%20%D0%BF%D0%B0%D1%86%D0%B8%D0%B5%D0%BD%D1%82%D0%BE%D0%B2.%20%D0%9A%D0%B0%D0%BA%D0%B8%D0%B5%20%D0%BF%D0%BE%D0%B1%D0%BE%D1%87%D0%BD%D1%8B%D0%B5%20%D1%8D%D1%84%D1%84%D0%B5%D0%BA%D1%82%D1%8B%20%D0%BC%D0%BE%D0%B6%D0%B5%D1%82%20%D0%B2%D1%8B%D0%B7%D0%B2%D0%B0%D1%82%D1%8C%20%D1%8D%D1%82%D0%BE%20%D0%BB%D0%B5%D0%BA%D0%B0%D1%80%D1%81%D1%82%D0%B2%D0%BE%3F%20%3Ca%20href%3D%22https%3A%2F%2Fprednisone4u.top%22%20%3E%20%D0%BF%D0%BE%D0%BB%D1%83%D1%87%D0%B8%D1%82%D1%8C%20%D0%B4%D0%B5%D1%88%D0%B5%D0%B2%D1%8B%D0%B9%20%D0%BF%D1%80%D0%B5%D0%B4%D0%BD%D0%B8%D0%B7%D0%BE%D0%BD%3C%20%2F%20a%3E%20%D0%B2%20%D0%A1%D0%A8%D0%90.%20%D0%92%D1%81%D0%B5%20%D0%BD%D0%B0%D0%BF%D1%80%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D1%8F%20%D0%BC%D0%B5%D0%B4%D0%B8%D1%86%D0%B8%D0%BD%D1%8B.%20%D0%A7%D0%B8%D1%82%D0%B0%D0%B9%D1%82%D0%B5%20%D0%B7%D0%B4%D0%B5%D1%81%D1%8C.%20%3Ca%20href%3Dhttp%3A%2F%2Fbpo.gov.mn%20%2F%20content%20%2F%20535%3E%D0%92%D1%81%D0%B5%20%D0%BE%20%D0%BD%D0%B0%D1%80%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%B0%D1%85.%3C%20%2F%20a%3E%20%3Ca%20href%3Dhttps%3A%2F%20%2F%20hoacuoivip.vn%20%2F%20nhung-dieu-co-the-ban-chua-biet-ve-le-an-hoi.html%23comment-18011%3E%D0%B2%D1%81%D0%B5%20%D1%82%D0%B5%D0%BD%D0%B4%D0%B5%D0%BD%D1%86%D0%B8%D0%B8%20%D1%80%D0%B0%D0%B7%D0%B2%D0%B8%D1%82%D0%B8%D1%8F%20%D0%BD%D0%B0%D1%80%D0%BA%D0%BE%D1%82%D0%B8%D0%BA%D0%BE%D0%B2.%3C%20%2F%20a%3E%20%3Ca%20href%3Dhttp%3A%2F%2Fjapaninfo.jp%20%2F%20recuruitforum%2F%3F%20mod%3Ddocument%26uid%3D394%23kboard-comments-394%3E%D0%B0%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F%20%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BE%20%D0%BC%D0%B5%D0%B4%D0%B8%D1%86%D0%B8%D0%BD%D0%B5.%3C%20%2F%20a%3E%203c01d9a]Actual news about medication.[/url] 70_697c
Boristiq Boristiq 2021-01-10 21:05:10
Medicament information for patients. Brand names. <a href="https://prednisone4u.top">cost of generic prednisone for sale</a> in the USA. All trends of drugs. Read information now. [url=https://www.extramural.academy/product/praktica-luxmedia-z250-digital-compact-camera-silver-20-mp5x-optical-zoom/#comment-34068]Best news about medicine.[/url] [url=https://byop.net/blog/2019/02/14/is-my-backyard-big-enough-for-a-pool/#comment-88475]Some about medicines.[/url] [url=https://dreamsistemas.com/gestao-de-estoque-em-clinicas-medicas/#comment-1554]Some trends of drugs.[/url] 2e6db03