laravel / homestead

MIT License
3.86k stars 1.45k forks source link

vagrant up throw Constraints: >= 13.0.0, < 14.0.0 #1838

Closed avinashseth closed 1 year ago

avinashseth commented 1 year ago

Versions

Host operating system

Windows 11

Homestead.yaml

ip: 192.168.56.56
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
  - ~/.ssh/id_rsa
folders:
  - map: 'C:\dev\folder\laravel-project'
    to: /home/vagrant/code
sites:
  - map: laravel-project.local
    to: /home/vagrant/code/public
databases:
  - laravel-project
features:
  - mysql: true
  - mariadb: false
  - postgresql: false
  - ohmyzsh: false
  - webdriver: false
services:
  - enabled: [mysql]
name: laravel-project
hostname: laravel-project

Vagrant destroy & up output

GitHub Gist

Expected behavior

It should run vagrant

Actual behavior

Getting error that Box Version: >= 13.0.0, < 14.0.0 should be like that, but official support for virtual box v13.0.0 is not available in the laravel vagrant box

Steps to reproduce

  1. Install new laravel project
  2. Follow per project homestead installation Offical Documentation

References

None

Temporary Solution

  1. Goto C:\dev\folder\laravel-project\vendor\laravel\homestead\scripts\homestead.rb
  2. Goto line 22
  3. update '>= 13.0.0, < 14.0.0' to '>= 12.0.0, < 14.0.0'
  4. Now vagrant up work

Conclusion

Not sure if temporary solution is correct, as everytime someone will install via composer install will have to make the changes again and again

dlundgren commented 1 year ago

The virtualbox vagrant box was not built/uploaded.

I found that you could add SpeakFriendAndEnter: true to your Homestead.yaml and that allowed an older version of the virtulbox provider to be used.

svpernova09 commented 1 year ago

The virtualbox vagrant box was not built/uploaded.

I found that you could add SpeakFriendAndEnter: true to your Homestead.yaml and that allowed an older version of the virtulbox provider to be used.

Don't do this.

Do this instead

git fetch origin
git checkout release
git checkout 2dad0ce3964657d6255235f450e254f4f0e9ea81

This will put Homestead back at v13.3.1

End users should never use SpeakFriendAndEnter because it's designed to prevent you from running incompatible boxes. This setting is used when I test my local development builds that aren't named laravel/homestead. If you're using this setting and I haven't explicitly given you instructions to do so: you should remove this setting.

avinashseth commented 1 year ago

@svpernova09 how to follow your steps when you are using per project homestead? because git fetch will fetch the project repo not the vagrant repo! or I'm missing something?

svpernova09 commented 1 year ago

@svpernova09 how to follow your steps when you are using per project homestead? because git fetch will fetch the project repo not the vagrant repo! or I'm missing something?

You'll want to set the version of laravel/homestead in your composer.json to dev-2dad0ce3964657d6255235f450e254f4f0e9ea81 which should check out that commit.

Good news: I'm currently uploading a Virtualbox for the latest version of Homestead.

svpernova09 commented 1 year ago

Latest base box has been released for Virtualbox https://app.vagrantup.com/laravel/boxes/homestead/versions/13.0.0