Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Can't run npm install in homestead #1434

@teleclimber

Description

@teleclimber

Versions

  • Vagrant: 2.2.9
  • Provider: Virtualbox, 6.1.10 r138449 (Qt5.6.2)
  • Homestead: most recent release branch.

Host operating system

Windows 10 Home 1903

Homestead.yaml

---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox

authorize: C:\Users\Ollie\ssh-keys\basic.pub

keys:
    - C:\Users\Ollie\ssh-keys\basic.ppk

folders:
    - map: C:\Users\Ollie\Code\tests\2020-06-06-laravel\
      to: /home/vagrant/laravel-test

sites:
    - map: laravel-test.develop
      to: /home/vagrant/laravel-test/lara-inst/public/

databases:
    - homestead

features:
    - mariadb: false
    - ohmyzsh: false
    - webdriver: false

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

Vagrant destroy & up output

https://gist.github.com/teleclimber/01531e4d4a25baf9b5fff39cccae6e03

Expected behavior

I am following this tutorial as I try to learn Laravel. I would expect things to work smoothly.

https://laravel-news.com/your-first-laravel-application

Actual behavior

Running npm install causes this error:

npm ERR! code EPROTO
npm ERR! syscall symlink
npm ERR! path ../@babel/parser/bin/babel-parser.js
npm ERR! dest /home/vagrant/laravel-test/lara-inst/node_modules/.bin/parser
npm ERR! errno -71
npm ERR! EPROTO: protocol error, symlink '../@babel/parser/bin/babel-parser.js' -> '/home/vagrant/laravel-test/lara-inst/node_modules/.bin/parser'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2020-06-09T23_05_35_417Z-debug.log

I found this issue that points to this solution that supposedly solves the problem.

I added these lines to my vagranfile after Vagrant.configure:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |v|
    v.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end

But it doesn't work. I destroy the VM and vagrant up again and npm install still fails.

What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions