Code Monkey home page Code Monkey logo

Comments (9)

hbend1li avatar hbend1li commented on May 26, 2024 5

i have same pb.
i fix it by adding

"artisan.serve.defaultHost": "127.0.0.1'",
"artisan.serve.defaultPort": "8000'"

in settings.json
don't forget to add ' after 127.0.0.1 and 8000
Screenshot from 2019-10-16 12-43-05

from vscode-laravel-artisan.

TheColorRed avatar TheColorRed commented on May 26, 2024 2

@emircansancar Made a small change, does this work for you:

laravel-artisan-0.0.27.zip

from vscode-laravel-artisan.

emircansancar avatar emircansancar commented on May 26, 2024 1

@emircansancar Made a small change, does this work for you:

laravel-artisan-0.0.27.zip

This worked for me.

from vscode-laravel-artisan.

emircansancar avatar emircansancar commented on May 26, 2024

+1
I encountered the same problem

Microsoft Windows [Version 10.0.18362.356]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\emirc\Projects\test>php "c:\Users\emirc\Projects\test\artisan" serve --host='localhost --port='8000

   ErrorException  : A non-numeric value encountered

  at C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:92
    88|     protected function port()
    89|     {
    90|         $port = $this->input->getOption('port') ?: 8000;
    91| 
  > 92|         return $port + $this->portOffset;
    93|     }
    94| 
    95|     /**
    96|      * Check if command has reached its max amount of port tries.

  Exception trace:

  1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("A non-numeric value encountered", "C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php", ["'8000"])
      C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:92

  2   Illuminate\Foundation\Console\ServeCommand::port()
      C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:45

  Please use the argument -v to see more details.

C:\Users\emirc\Projects\test>

from vscode-laravel-artisan.

TheColorRed avatar TheColorRed commented on May 26, 2024

Looks like there was possibly a git merge problem with adding/removing quotes in the command. Give this a try and let me know if it fixes the problem:

laravel-artisan-0.0.27.zip

from vscode-laravel-artisan.

emircansancar avatar emircansancar commented on May 26, 2024

Unfortunately the problem still exists.

Microsoft Windows [Version 10.0.18362.356]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\emirc\Projects\test>php "c:\Users\emirc\Projects\test\artisan" serve --host='localhost' --port='8000'

   ErrorException  : A non-numeric value encountered

  at C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:92
    88|     protected function port()
    89|     {
    90|         $port = $this->input->getOption('port') ?: 8000;
    91| 
  > 92|         return $port + $this->portOffset;
    93|     }
    94| 
    95|     /**
    96|      * Check if command has reached its max amount of port tries.

  Exception trace:

  1   Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("A non-numeric value encountered", "C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php", ["'8000'"])
      C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:92

  2   Illuminate\Foundation\Console\ServeCommand::port()
      C:\Users\emirc\Projects\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:45

  Please use the argument -v to see more details.

from vscode-laravel-artisan.

alaminfirdows avatar alaminfirdows commented on May 26, 2024

image

I've got this error.

from vscode-laravel-artisan.

alaminfirdows avatar alaminfirdows commented on May 26, 2024

image
It's works for me.

from vscode-laravel-artisan.

TheColorRed avatar TheColorRed commented on May 26, 2024

This has been published.

from vscode-laravel-artisan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.