简体   繁体   中英

“laravel homestead vagrant up errors”

I am trying to set up Laravel Homestead environment. When I try to launch the vagrant box I get an error.

C:\Users\ONYIA\Homestead>vagrant up C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:377:in parse': (<unknown>): did not find expected key while parsing a block mapping at line 13 column 6 (Psych::SyntaxError) from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:377:in parse_stream' from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:325:in parse' from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/psych.rb:252:in load' from C:/Users/ONYIA/Homestead/Vagrantfile:29:in block in <top (required)>' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/config/v2/loader.rb:37:in load' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/con fig/loader.rb:126:in block (2 levels) in load' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/config/loader.rb:119:in each' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/config/loader.rb:119:in block in load' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/config/loader.rb:116:in each' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/config/loader.rb:116:in load' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/vagrantfile.rb:29:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:792:in new' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:792:in new' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:792:in vagrantfile' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:973:in process_configured_plugins' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/lib/vagrant/environment.rb:178:in initialize' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/bin/vagrant:145:in new' from C:/HashiCorp/Vagrant/embedded/gems/2.2.6/gems/vagrant-2.2.6/bin/vagrant:145:in '

It is hard to narrow this down specifically to your issue without a lot more information, such as how you provisioned the box, some environment info, etc.

However, I have run into a similar error that may be helpful to you. In my case, there was an extra space in my yaml file before a key value. Look through your initialization files -- however you have set this up, be it yaml or json , or whatever -- and check for spaces before a key in that file.

As an example, in Laravel's.env file , this might cause a similar issue:

APP_KEY =  J3b0MXEWRrqf3DYvwmpYtsbGXv3I2g89U   // <-- shouldn't have spaces
// Should be more like:
APP_KEY=J3b0MXEWRrqf3DYvwmpYtsbGXv3I2g89U

Not a real key:)

Another place this turns up is sometimes with missing " ' " apostrophies. Check your environment files and make sure all of your quoted items are closed off.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM